diff options
author | hunt <hunt> | 2005-06-15 23:55:55 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-06-15 23:55:55 +0000 |
commit | 3acf7c2c759a40dc0bc88f9c5ae5ed208b77e2a4 (patch) | |
tree | c4c6926e5fa11331f0241494e3ab1b69741a824a /runtime/current.c | |
parent | cc637c9ef930cd8af20f3163fc251a6507df59fb (diff) | |
download | systemtap-steved-3acf7c2c759a40dc0bc88f9c5ae5ed208b77e2a4.tar.gz systemtap-steved-3acf7c2c759a40dc0bc88f9c5ae5ed208b77e2a4.tar.xz systemtap-steved-3acf7c2c759a40dc0bc88f9c5ae5ed208b77e2a4.zip |
2005-06-15 Martin Hunt <hunt@redhat.com>
* current.c (_stp_ret_addr): Fix computation for i386.
Diffstat (limited to 'runtime/current.c')
-rw-r--r-- | runtime/current.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/current.c b/runtime/current.c index 4485ef2c..82ab400e 100644 --- a/runtime/current.c +++ b/runtime/current.c @@ -21,12 +21,17 @@ unsigned long _stp_ret_addr (struct pt_regs *regs) { - unsigned long *ra = (unsigned long *)REG_SP(regs); - +#ifdef __x86_64__ + unsigned long *ra = (unsigned long *)regs->rsp; if (ra) return *ra; else return 0; +#elif defined (__i386__) + return regs->esp; +#else + #error Unimplemented architecture +#endif } #ifdef __x86_64__ |