]> sourceware.org Git - systemtap.git/commitdiff
2005-06-15 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Wed, 15 Jun 2005 23:55:55 +0000 (23:55 +0000)
committerhunt <hunt>
Wed, 15 Jun 2005 23:55:55 +0000 (23:55 +0000)
* current.c (_stp_ret_addr): Fix computation for i386.

runtime/ChangeLog
runtime/current.c

index e00e43f0d671577cac85e91b8db32263a024bcc0..b40ae6669579a75627dcaa45c5809513f26f43f3 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-15  Martin Hunt  <hunt@redhat.com>
+
+       * current.c (_stp_ret_addr): Fix computation for i386.
+
 2005-06-14  Martin Hunt  <hunt@redhat.com>
 
        * README: Removed old docs and replaced with simple build 
index 4485ef2c50b56a61e5daa1ed27e8a05efae97338..82ab400eba3dc14162ef96c60923ce9360676cbf 100644 (file)
  
 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__
This page took 0.029097 seconds and 5 git commands to generate.