about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/__longjmp-common.S
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-11-22 06:36:54 -0600
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-12-05 07:44:07 -0600
commiteb5ad6b9bcf579f1cb5c67ca4650ee4a0cf1b4b1 (patch)
treeb82b8fbfb23fb60cc69d4bd06bf8ef13c471c9eb /sysdeps/powerpc/powerpc64/__longjmp-common.S
parent76a4a26979e58132d500e700ac1637a09c6d9cef (diff)
downloadglibc-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/powerpc64/__longjmp-common.S')
-rw-r--r--sysdeps/powerpc/powerpc64/__longjmp-common.S9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/powerpc/powerpc64/__longjmp-common.S b/sysdeps/powerpc/powerpc64/__longjmp-common.S
index ce5a018e37..3c792b495e 100644
--- a/sysdeps/powerpc/powerpc64/__longjmp-common.S
+++ b/sysdeps/powerpc/powerpc64/__longjmp-common.S
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <stap-probe.h>
 #define _ASM
 #define _SETJMP_H
 #ifdef __NO_VMX__
@@ -147,20 +148,23 @@ L(no_vmx):
 #ifdef PTR_DEMANGLE
 	PTR_DEMANGLE2 (r0, r25)
 #endif
+     /* longjmp/longjmp_target probe expects longjmp first argument (8@3),
+	second argument (-4@4), and target address (8@0), respectively.  */
+	LIBC_PROBE (longjmp, 3, 8@3, -4@4, 8@0)
 	mtlr r0
 /* 	std r2,FRAME_TOC_SAVE(r1)	Restore the TOC save area.  */
 	ld r21,((JB_GPRS+7)*8)(r3)
 	lfd fp21,((JB_FPRS+7)*8)(r3)
 	ld r22,((JB_GPRS+8)*8)(r3)
 	lfd fp22,((JB_FPRS+8)*8)(r3)
-	lwz r0,((JB_CR*8)+4)(r3)	/* 32-bit CR.  */
+	lwz r5,((JB_CR*8)+4)(r3)	/* 32-bit CR.  */
 	ld r23,((JB_GPRS+9)*8)(r3)
 	lfd fp23,((JB_FPRS+9)*8)(r3)
 	ld r24,((JB_GPRS+10)*8)(r3)
 	lfd fp24,((JB_FPRS+10)*8)(r3)
 	ld r25,((JB_GPRS+11)*8)(r3)
 	lfd fp25,((JB_FPRS+11)*8)(r3)
-	mtcrf 0xFF,r0
+	mtcrf 0xFF,r5
 	ld r26,((JB_GPRS+12)*8)(r3)
 	lfd fp26,((JB_FPRS+12)*8)(r3)
 	ld r27,((JB_GPRS+13)*8)(r3)
@@ -173,6 +177,7 @@ L(no_vmx):
 	lfd fp30,((JB_FPRS+16)*8)(r3)
 	ld r31,((JB_GPRS+17)*8)(r3)
 	lfd fp31,((JB_FPRS+17)*8)(r3)
+	LIBC_PROBE (longjmp_target, 3, 8@3, -4@4, 8@0)
 	mr r3,r4
 	blr
 END (__longjmp)