diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2013-11-22 06:36:54 -0600 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2013-12-05 07:44:07 -0600 |
commit | eb5ad6b9bcf579f1cb5c67ca4650ee4a0cf1b4b1 (patch) | |
tree | b82b8fbfb23fb60cc69d4bd06bf8ef13c471c9eb /sysdeps/powerpc/powerpc32/__longjmp-common.S | |
parent | 76a4a26979e58132d500e700ac1637a09c6d9cef (diff) | |
download | glibc-eb5ad6b9bcf579f1cb5c67ca4650ee4a0cf1b4b1.tar.gz glibc-eb5ad6b9bcf579f1cb5c67ca4650ee4a0cf1b4b1.tar.xz glibc-eb5ad6b9bcf579f1cb5c67ca4650ee4a0cf1b4b1.zip |
PowerPC: Add systemtap static probe points in setjmp/longjmp
This patch add static probes for setjmp/longjmp in the way gdb expects,fixing the gdb.base/longjmp.exp gdb testcases. It changes the symbol_name and use macros to to avoid change the probe names and ending up adding more logic on GDB (since with the expected name GDB work seamlessly).
Diffstat (limited to 'sysdeps/powerpc/powerpc32/__longjmp-common.S')
-rw-r--r-- | sysdeps/powerpc/powerpc32/__longjmp-common.S | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/powerpc/powerpc32/__longjmp-common.S b/sysdeps/powerpc/powerpc32/__longjmp-common.S index df1d5195f1..97c966db4a 100644 --- a/sysdeps/powerpc/powerpc32/__longjmp-common.S +++ b/sysdeps/powerpc/powerpc32/__longjmp-common.S @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <stap-probe.h> #define _ASM #ifdef __NO_VMX__ # include <novmxsetjmp.h> @@ -30,7 +31,7 @@ # define LOAD_GP(N) lwz r##N,((JB_GPRS+(N)-14)*4)(r3) #endif -ENTRY (__longjmp) +ENTRY (__longjmp_symbol) #if defined PTR_DEMANGLE || defined CHECK_SP lwz r24,(JB_GPR1*4)(r3) @@ -58,20 +59,24 @@ ENTRY (__longjmp) # endif PTR_DEMANGLE2 (r0, r25) #endif + /* longjmp/longjmp_target probe expects longjmp first argument (4@3), + second argument (-4@4), and target address (4@0), respectively. */ + LIBC_PROBE (longjmp, 3, 4@3, -4@4, 4@0) mtlr r0 LOAD_GP (21) LOAD_GP (22) - lwz r0,(JB_CR*4)(r3) + lwz r5,(JB_CR*4)(r3) LOAD_GP (23) LOAD_GP (24) LOAD_GP (25) - mtcrf 0xFF,r0 + mtcrf 0xFF,r5 LOAD_GP (26) LOAD_GP (27) LOAD_GP (28) LOAD_GP (29) LOAD_GP (30) LOAD_GP (31) + LIBC_PROBE (longjmp_target, 3, 4@3, -4@4, 4@0) mr r3,r4 blr -END (__longjmp) +END (__longjmp_symbol) |