1*4882a593SmuzhiyunFrom 7311686d6286972ff97cc18b2416a4cdd7fc5c7e Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 3*4882a593SmuzhiyunDate: Sat, 31 Oct 2015 12:15:24 +0100 4*4882a593SmuzhiyunSubject: [PATCH] Define PTRACE_GETSIGINFO on PowerPC when not available 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunuClibc 0.9.33.2 does not define PTRACE_GETSIGINFO in PowerPC. Even 7*4882a593Smuzhiyunthough Buildroot has a uClibc patch doing that, it doesn't solve the 8*4882a593Smuzhiyuncase of external uClibc toolchain from other sources (such as 9*4882a593SmuzhiyunCrosstool-NG). Therefore, this patch modifies Valgrind to define 10*4882a593SmuzhiyunPTRACE_GETSIGINFO on PowerPC to the right value, when such definition 11*4882a593Smuzhiyunis not available from the C library. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 14*4882a593Smuzhiyun--- 15*4882a593Smuzhiyun coregrind/vgdb-invoker-ptrace.c | 6 ++++++ 16*4882a593Smuzhiyun 1 file changed, 6 insertions(+) 17*4882a593Smuzhiyun 18*4882a593Smuzhiyundiff --git a/coregrind/vgdb-invoker-ptrace.c b/coregrind/vgdb-invoker-ptrace.c 19*4882a593Smuzhiyunindex d65f59a..bdefac2 100644 20*4882a593Smuzhiyun--- a/coregrind/vgdb-invoker-ptrace.c 21*4882a593Smuzhiyun+++ b/coregrind/vgdb-invoker-ptrace.c 22*4882a593Smuzhiyun@@ -72,6 +72,12 @@ 23*4882a593Smuzhiyun # endif 24*4882a593Smuzhiyun #endif 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun+#if defined(__powerpc__) 27*4882a593Smuzhiyun+# ifndef PTRACE_GETSIGINFO 28*4882a593Smuzhiyun+# define PTRACE_GETSIGINFO 0x4202 29*4882a593Smuzhiyun+# endif 30*4882a593Smuzhiyun+#endif 31*4882a593Smuzhiyun+ 32*4882a593Smuzhiyun // 32-bit or 64-bit wide, depending on primary architecture. 33*4882a593Smuzhiyun typedef Addr CORE_ADDR; 34*4882a593Smuzhiyun typedef Addr PTRACE_XFER_TYPE; 35*4882a593Smuzhiyun-- 36*4882a593Smuzhiyun2.1.4 37*4882a593Smuzhiyun 38