From eb5ad6b9bcf579f1cb5c67ca4650ee4a0cf1b4b1 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 22 Nov 2013 06:36:54 -0600 Subject: 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). --- sysdeps/powerpc/powerpc32/__longjmp-common.S | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sysdeps/powerpc/powerpc32/__longjmp-common.S') 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 @@ . */ #include +#include #define _ASM #ifdef __NO_VMX__ # include @@ -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) -- cgit 1.4.1