From 5826e159863b6cd69953dc01faf7c20414409909 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 24 Jul 2015 14:57:20 +0100 Subject: [PATCH] Linux: sys/ptrace.h -> nat/gdb_ptrace.h everywhere So that we pick the enum __ptrace_request fix everywhere. gdb/ChangeLog: 2015-07-24 Pedro Alves * aarch64-linux-nat.c: Include nat/gdb_ptrace.h instead of sys/ptrace.h. * alpha-linux-nat.c: Likewise. * amd64-linux-nat.c: Likewise. * arm-linux-nat.c: Likewise. * hppa-linux-nat.c: Likewise. * i386-linux-nat.c: Likewise. * ia64-linux-nat.c: Likewise. * linux-fork.c: Likewise. * linux-nat.c: Likewise. * m32r-linux-nat.c: Likewise. * m68klinux-nat.c: Likewise. * mips-linux-nat.c: Likewise. * nat/linux-btrace.c: Likewise. * nat/linux-ptrace.c: Likewise. * nat/linux-ptrace.h * nat/mips-linux-watch.c: Likewise. * nat/x86-linux-dregs.c: Likewise. * ppc-linux-nat.c: Likewise. * s390-linux-nat.c: Likewise. * spu-linux-nat.c: Likewise. * tilegx-linux-nat.c: Likewise. * x86-linux-nat.c: Likewise. * xtensa-linux-nat.c: Likewise. gdb/gdbserver/ChangeLog: 2015-07-24 Pedro Alves * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of sys/ptrace.h. * linux-arm-low.c: Likewise. * linux-cris-low.c: Likewise. * linux-crisv32-low.c: Likewise. * linux-low.c: Likewise. * linux-m68k-low.c: Likewise. * linux-mips-low.c: Likewise. * linux-nios2-low.c: Likewise. * linux-s390-low.c: Likewise. * linux-sparc-low.c: Likewise. * linux-tic6x-low.c: Likewise. * linux-tile-low.c: Likewise. * linux-x86-low.c: Likewise. --- gdb/ChangeLog | 27 +++++++++++++++++++++++++++ gdb/aarch64-linux-nat.c | 2 +- gdb/alpha-linux-nat.c | 2 +- gdb/amd64-linux-nat.c | 2 +- gdb/arm-linux-nat.c | 2 +- gdb/gdbserver/ChangeLog | 17 +++++++++++++++++ gdb/gdbserver/linux-aarch64-low.c | 2 +- gdb/gdbserver/linux-arm-low.c | 2 +- gdb/gdbserver/linux-cris-low.c | 2 +- gdb/gdbserver/linux-crisv32-low.c | 2 +- gdb/gdbserver/linux-low.c | 2 +- gdb/gdbserver/linux-m68k-low.c | 2 +- gdb/gdbserver/linux-mips-low.c | 2 +- gdb/gdbserver/linux-nios2-low.c | 2 +- gdb/gdbserver/linux-s390-low.c | 2 +- gdb/gdbserver/linux-sparc-low.c | 2 +- gdb/gdbserver/linux-tic6x-low.c | 2 +- gdb/gdbserver/linux-tile-low.c | 2 +- gdb/gdbserver/linux-x86-low.c | 3 ++- gdb/hppa-linux-nat.c | 2 +- gdb/i386-linux-nat.c | 2 +- gdb/ia64-linux-nat.c | 2 +- gdb/linux-fork.c | 2 +- gdb/linux-nat.c | 2 +- gdb/m32r-linux-nat.c | 2 +- gdb/m68klinux-nat.c | 2 +- gdb/mips-linux-nat.c | 2 +- gdb/nat/linux-btrace.c | 2 +- gdb/nat/linux-ptrace.c | 1 + gdb/nat/linux-ptrace.h | 2 +- gdb/nat/mips-linux-watch.c | 2 +- gdb/nat/x86-linux-dregs.c | 2 +- gdb/ppc-linux-nat.c | 2 +- gdb/s390-linux-nat.c | 2 +- gdb/spu-linux-nat.c | 2 +- gdb/tilegx-linux-nat.c | 2 +- gdb/x86-linux-nat.c | 2 +- gdb/xtensa-linux-nat.c | 2 +- 38 files changed, 81 insertions(+), 35 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 57be70778c5..f6898fc0be7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,30 @@ +2015-07-24 Pedro Alves + + * aarch64-linux-nat.c: Include nat/gdb_ptrace.h instead of + sys/ptrace.h. + * alpha-linux-nat.c: Likewise. + * amd64-linux-nat.c: Likewise. + * arm-linux-nat.c: Likewise. + * hppa-linux-nat.c: Likewise. + * i386-linux-nat.c: Likewise. + * ia64-linux-nat.c: Likewise. + * linux-fork.c: Likewise. + * linux-nat.c: Likewise. + * m32r-linux-nat.c: Likewise. + * m68klinux-nat.c: Likewise. + * mips-linux-nat.c: Likewise. + * nat/linux-btrace.c: Likewise. + * nat/linux-ptrace.c: Likewise. + * nat/linux-ptrace.h + * nat/mips-linux-watch.c: Likewise. + * nat/x86-linux-dregs.c: Likewise. + * ppc-linux-nat.c: Likewise. + * s390-linux-nat.c: Likewise. + * spu-linux-nat.c: Likewise. + * tilegx-linux-nat.c: Likewise. + * x86-linux-nat.c: Likewise. + * xtensa-linux-nat.c: Likewise. + 2015-07-24 Pedro Alves * ptrace.m4 (ptrace tests): Test in C++ mode. Try with 'enum diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index dae0c15d7de..758b30fee07 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c @@ -35,7 +35,7 @@ #include "elf/external.h" #include "elf/common.h" -#include +#include "nat/gdb_ptrace.h" #include #include diff --git a/gdb/alpha-linux-nat.c b/gdb/alpha-linux-nat.c index 52fbdad0555..f735ffcf1cb 100644 --- a/gdb/alpha-linux-nat.c +++ b/gdb/alpha-linux-nat.c @@ -23,7 +23,7 @@ #include "alpha-tdep.h" -#include +#include "nat/gdb_ptrace.h" #include #include diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index 2e1b081b0f4..397f6643c4f 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -23,7 +23,7 @@ #include "regcache.h" #include "elf/common.h" #include -#include +#include "nat/gdb_ptrace.h" #include #include #include "gregset.h" diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index f0ab98cace1..ff156d0df5a 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -33,7 +33,7 @@ #include #include -#include +#include "nat/gdb_ptrace.h" #include #include diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 664f674aa27..40826ed99ae 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,20 @@ +2015-07-24 Pedro Alves + + * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of + sys/ptrace.h. + * linux-arm-low.c: Likewise. + * linux-cris-low.c: Likewise. + * linux-crisv32-low.c: Likewise. + * linux-low.c: Likewise. + * linux-m68k-low.c: Likewise. + * linux-mips-low.c: Likewise. + * linux-nios2-low.c: Likewise. + * linux-s390-low.c: Likewise. + * linux-sparc-low.c: Likewise. + * linux-tic6x-low.c: Likewise. + * linux-tile-low.c: Likewise. + * linux-x86-low.c: Likewise. + 2015-07-24 Pedro Alves * config.in: Regenerate. diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c index 79eb44c8121..3a47521e14f 100644 --- a/gdb/gdbserver/linux-aarch64-low.c +++ b/gdb/gdbserver/linux-aarch64-low.c @@ -26,7 +26,7 @@ #include #include -#include +#include "nat/gdb_ptrace.h" #include #include diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c index dd77b48ecdc..14c96a3fcb0 100644 --- a/gdb/gdbserver/linux-arm-low.c +++ b/gdb/gdbserver/linux-arm-low.c @@ -24,7 +24,7 @@ #ifndef ELFMAG0 #include #endif -#include +#include "nat/gdb_ptrace.h" #include /* Defined in auto-generated files. */ diff --git a/gdb/gdbserver/linux-cris-low.c b/gdb/gdbserver/linux-cris-low.c index 4e5e4c06847..e0bfa1a583b 100644 --- a/gdb/gdbserver/linux-cris-low.c +++ b/gdb/gdbserver/linux-cris-low.c @@ -18,7 +18,7 @@ #include "server.h" #include "linux-low.h" -#include +#include "nat/gdb_ptrace.h" /* Defined in auto-generated file reg-cris.c. */ void init_registers_cris (void); diff --git a/gdb/gdbserver/linux-crisv32-low.c b/gdb/gdbserver/linux-crisv32-low.c index 65e6c09df27..51208638d97 100644 --- a/gdb/gdbserver/linux-crisv32-low.c +++ b/gdb/gdbserver/linux-crisv32-low.c @@ -18,7 +18,7 @@ #include "server.h" #include "linux-low.h" -#include +#include "nat/gdb_ptrace.h" /* Defined in auto-generated file reg-crisv32.c. */ void init_registers_crisv32 (void); diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 7b4318702a6..9bc9fa37c4f 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -26,7 +26,7 @@ #include "nat/linux-nat.h" #include "nat/linux-waitpid.h" #include "gdb_wait.h" -#include +#include "nat/gdb_ptrace.h" #include "nat/linux-ptrace.h" #include "nat/linux-procfs.h" #include "nat/linux-personality.h" diff --git a/gdb/gdbserver/linux-m68k-low.c b/gdb/gdbserver/linux-m68k-low.c index 4501904e391..39c9cc5a1f9 100644 --- a/gdb/gdbserver/linux-m68k-low.c +++ b/gdb/gdbserver/linux-m68k-low.c @@ -68,7 +68,7 @@ m68k_cannot_fetch_register (int regno) #ifdef HAVE_PTRACE_GETREGS #include -#include +#include "nat/gdb_ptrace.h" static void m68k_fill_gregset (struct regcache *regcache, void *buf) diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c index 1695c4cf0dd..d3b01d61f95 100644 --- a/gdb/gdbserver/linux-mips-low.c +++ b/gdb/gdbserver/linux-mips-low.c @@ -19,7 +19,7 @@ #include "server.h" #include "linux-low.h" -#include +#include "nat/gdb_ptrace.h" #include #include "nat/mips-linux-watch.h" diff --git a/gdb/gdbserver/linux-nios2-low.c b/gdb/gdbserver/linux-nios2-low.c index 7bd3c9795d3..8a7ac28b2b3 100644 --- a/gdb/gdbserver/linux-nios2-low.c +++ b/gdb/gdbserver/linux-nios2-low.c @@ -22,7 +22,7 @@ #include "server.h" #include "linux-low.h" #include "elf/common.h" -#include +#include "nat/gdb_ptrace.h" #include #include "gdb_proc_service.h" #include diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c index 5d4ea1ff45f..8a0a6891433 100644 --- a/gdb/gdbserver/linux-s390-low.c +++ b/gdb/gdbserver/linux-s390-low.c @@ -24,7 +24,7 @@ #include "elf/common.h" #include -#include +#include "nat/gdb_ptrace.h" #include #include diff --git a/gdb/gdbserver/linux-sparc-low.c b/gdb/gdbserver/linux-sparc-low.c index 8f5cdbf8ba5..796af8aa576 100644 --- a/gdb/gdbserver/linux-sparc-low.c +++ b/gdb/gdbserver/linux-sparc-low.c @@ -19,7 +19,7 @@ #include "server.h" #include "linux-low.h" -#include +#include "nat/gdb_ptrace.h" #include "gdb_proc_service.h" diff --git a/gdb/gdbserver/linux-tic6x-low.c b/gdb/gdbserver/linux-tic6x-low.c index 0a0d220c345..a2ac3eec827 100644 --- a/gdb/gdbserver/linux-tic6x-low.c +++ b/gdb/gdbserver/linux-tic6x-low.c @@ -22,7 +22,7 @@ #include "server.h" #include "linux-low.h" -#include +#include "nat/gdb_ptrace.h" #include #include "gdb_proc_service.h" diff --git a/gdb/gdbserver/linux-tile-low.c b/gdb/gdbserver/linux-tile-low.c index 2f72fdb8291..6aaea6a080e 100644 --- a/gdb/gdbserver/linux-tile-low.c +++ b/gdb/gdbserver/linux-tile-low.c @@ -21,7 +21,7 @@ #include "linux-low.h" #include -#include +#include "nat/gdb_ptrace.h" /* Defined in auto-generated file reg-tilegx.c. */ void init_registers_tilegx (void); diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c index 484eadba054..ec2d9068a0f 100644 --- a/gdb/gdbserver/linux-x86-low.c +++ b/gdb/gdbserver/linux-x86-low.c @@ -25,6 +25,7 @@ #include "i387-fp.h" #include "x86-low.h" #include "x86-xstate.h" +#include "nat/gdb_ptrace.h" #include "gdb_proc_service.h" /* Don't include elf/common.h if linux/elf.h got included by @@ -117,7 +118,7 @@ static const char *xmltarget_amd64_linux_no_xml = "@\ #include #include -#include +#include "nat/gdb_ptrace.h" #include #ifndef PTRACE_GET_THREAD_AREA diff --git a/gdb/hppa-linux-nat.c b/gdb/hppa-linux-nat.c index cfadf73c1c0..0694f6128f2 100644 --- a/gdb/hppa-linux-nat.c +++ b/gdb/hppa-linux-nat.c @@ -25,7 +25,7 @@ #include "linux-nat.h" #include -#include +#include "nat/gdb_ptrace.h" #include #include diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 349ce68f5c3..63d2648a221 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -22,7 +22,7 @@ #include "gdbcore.h" #include "regcache.h" #include "elf/common.h" -#include +#include "nat/gdb_ptrace.h" #include #include "gregset.h" #include "gdb_proc_service.h" diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index 31b32487d8b..fc17d81b862 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -27,7 +27,7 @@ #include "linux-nat.h" #include -#include +#include "nat/gdb_ptrace.h" #include "gdb_wait.h" #ifdef HAVE_SYS_REG_H #include diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index 27603b36c94..dbaa36eb4a7 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -30,7 +30,7 @@ #include "gdbthread.h" #include "source.h" -#include +#include "nat/gdb_ptrace.h" #include "gdb_wait.h" #include #include diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index be429f8e4ae..e383d8ad642 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -28,7 +28,7 @@ #include #include #endif -#include +#include "nat/gdb_ptrace.h" #include "linux-nat.h" #include "nat/linux-ptrace.h" #include "nat/linux-procfs.h" diff --git a/gdb/m32r-linux-nat.c b/gdb/m32r-linux-nat.c index e5e867b3491..781bb78b50b 100644 --- a/gdb/m32r-linux-nat.c +++ b/gdb/m32r-linux-nat.c @@ -23,7 +23,7 @@ #include "regcache.h" #include "linux-nat.h" #include "target.h" -#include +#include "nat/gdb_ptrace.h" #include #include diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c index 8f89d7b87ad..e6a4ad946de 100644 --- a/gdb/m68klinux-nat.c +++ b/gdb/m68klinux-nat.c @@ -30,7 +30,7 @@ #include #include -#include +#include "nat/gdb_ptrace.h" #include #include #include diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c index a36bb6356f1..961cb6f8636 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -32,7 +32,7 @@ #include "gregset.h" #include -#include +#include "nat/gdb_ptrace.h" #include #include "nat/mips-linux-watch.h" diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c index 63fcdc83103..88ddc612782 100644 --- a/gdb/nat/linux-btrace.c +++ b/gdb/nat/linux-btrace.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include "nat/gdb_ptrace.h" #include #include #include diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c index 1a926f93156..f097c8a3622 100644 --- a/gdb/nat/linux-ptrace.c +++ b/gdb/nat/linux-ptrace.c @@ -22,6 +22,7 @@ #include "linux-waitpid.h" #include "buffer.h" #include "gdb_wait.h" +#include "gdb_ptrace.h" /* Stores the ptrace options supported by the running kernel. A value of -1 means we did not check for features yet. A value diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h index be6c39528c9..41f668cd93b 100644 --- a/gdb/nat/linux-ptrace.h +++ b/gdb/nat/linux-ptrace.h @@ -20,7 +20,7 @@ struct buffer; -#include +#include "nat/gdb_ptrace.h" #ifdef __UCLIBC__ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__)) diff --git a/gdb/nat/mips-linux-watch.c b/gdb/nat/mips-linux-watch.c index 464f709cc9d..02d83f65bf8 100644 --- a/gdb/nat/mips-linux-watch.c +++ b/gdb/nat/mips-linux-watch.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ #include "common-defs.h" -#include +#include "nat/gdb_ptrace.h" #include "mips-linux-watch.h" /* Assuming usable watch registers REGS, return the irw_mask of diff --git a/gdb/nat/x86-linux-dregs.c b/gdb/nat/x86-linux-dregs.c index 93898033a66..666d86a6f70 100644 --- a/gdb/nat/x86-linux-dregs.c +++ b/gdb/nat/x86-linux-dregs.c @@ -18,7 +18,7 @@ along with this program. If not, see . */ #include "common-defs.h" -#include +#include "nat/gdb_ptrace.h" #include #include "target/waitstatus.h" #include "nat/x86-linux.h" diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 4ed03d0204d..751468551e1 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -33,7 +33,7 @@ #include "gdb_wait.h" #include #include -#include +#include "nat/gdb_ptrace.h" /* Prototypes for supply_gregset etc. */ #include "gregset.h" diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c index cedc505e1bd..94edce8bdb0 100644 --- a/gdb/s390-linux-nat.c +++ b/gdb/s390-linux-nat.c @@ -33,7 +33,7 @@ #include "elf/common.h" #include -#include +#include "nat/gdb_ptrace.h" #include #include #include diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c index a043f53d377..cb182bebcef 100644 --- a/gdb/spu-linux-nat.c +++ b/gdb/spu-linux-nat.c @@ -30,7 +30,7 @@ #include "gdbthread.h" #include "gdb_bfd.h" -#include +#include "nat/gdb_ptrace.h" #include #include diff --git a/gdb/tilegx-linux-nat.c b/gdb/tilegx-linux-nat.c index b8f0c76541b..b9ce47ac3fb 100644 --- a/gdb/tilegx-linux-nat.c +++ b/gdb/tilegx-linux-nat.c @@ -23,7 +23,7 @@ #include "regcache.h" #include "linux-nat.h" -#include +#include "nat/gdb_ptrace.h" #include diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c index 04917d08571..34a9257ba31 100644 --- a/gdb/x86-linux-nat.c +++ b/gdb/x86-linux-nat.c @@ -21,7 +21,7 @@ #include "inferior.h" #include "elf/common.h" #include "gdb_proc_service.h" -#include +#include "nat/gdb_ptrace.h" #include #include #include diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c index fa627320d6f..7f530ce7903 100644 --- a/gdb/xtensa-linux-nat.c +++ b/gdb/xtensa-linux-nat.c @@ -31,7 +31,7 @@ #include "gdb_wait.h" #include #include -#include +#include "nat/gdb_ptrace.h" #include #include "gregset.h" -- 2.30.2