|
From: <sv...@va...> - 2013-07-25 20:40:25
|
philippe 2013-07-25 21:40:17 +0100 (Thu, 25 Jul 2013)
New Revision: 13471
Log:
do not include linux/ptrace.h in vgdb.c
Include of linux/ptrace.h was added in revision r11740,
to avoid compilation error on s390x (fedora and suse).
The compilation error was retrieved thanks to archeological research
done by Christian Borntraeger: without this include, the following was given:
error: 'PT_ENDREGS' undeclared
There was also some errors on ppc64 around the same time:
error: 'PTRACE_GETREGS' undeclared
Currently, the inclusion of linux/ptrace.h gives a problem on amd64/fedora20:
/usr/include/linux/ptrace.h:58:8: error: redefinition of ‘struct ptrace_peeksiginfo_args’
/usr/include/sys/ptrace.h:191:8: note: originally defined here
According to man ptrace, it is good enough to include sys/ptrace.h
(which should avoid the problem on amd64/f20).
The linux/ptrace.h is deemed not necessary anymore as:
1. Christian has tested on sles11sp2 on s390x.
2. since linux/ptrace.h was added in vgdb.c, #ifdef PT_ENDREGS and
#ifdef PTRACE_GETREGS were added
=> remove the linux/ptrace.h
(tested on x86/f12, ppc64/f18, amd64/deb6, sles11sp2/s390x)
Thanks to Christian for the investigations
Modified files:
trunk/coregrind/vgdb.c
Modified: trunk/coregrind/vgdb.c (+0 -3)
===================================================================
--- trunk/coregrind/vgdb.c 2013-07-25 09:22:08 +01:00 (rev 13470)
+++ trunk/coregrind/vgdb.c 2013-07-25 21:40:17 +01:00 (rev 13471)
@@ -100,10 +100,7 @@
#if defined(PTRACEINVOKER)
#include <sys/user.h>
-#if defined(VGO_linux)
-# include <linux/ptrace.h>
#endif
-#endif
// Outputs information for the user about ptrace not working.
|