]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
do not include linux/ptrace.h in vgdb.c
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 25 Jul 2013 20:40:17 +0000 (20:40 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 25 Jul 2013 20:40:17 +0000 (20:40 +0000)
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

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13471

coregrind/vgdb.c

index dc3bedae1cdf1ddf35a69aeb0ca34806082bf09c..2df024f246ef7218c770b2772956faf45cfb75b9 100644 (file)
@@ -100,9 +100,6 @@ I_die_here : (PTRACEINVOKER) architecture missing in vgdb.c
 
 #if defined(PTRACEINVOKER)
 #include <sys/user.h>
-#if defined(VGO_linux)
-#  include <linux/ptrace.h>
-#endif
 #endif