From 3116063bd617de56fbc3bad046a692b1fb363a9d Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Fri, 27 Jun 2014 09:52:29 +0100 Subject: [PATCH] Tidy #include lists This commit tidies up the #include lists in {i386,amd64}-linux-nat.c, removing headers that are no longer required and reordering some lines so that both files roughly match. Additionally, an unused definition was removed from the middle of the #include list in i386-linux-nat.c. gdb/ 2014-07-11 Gary Benson * amd64-linux-nat.c (gdbcore.h): Remove include. (regset.h): Likewise. (nat/linux-btrace.h): Likewise. (btrace.h): Likewise. (gdb_assert.h): Likewise. (string.h): Likewise. (sys/uio.h): Likewise. (sys/debugreg.h): Likewise. (sys/syscall.h): Likewise. (sys/procfs.h): Likewise. (sys/user.h): Likewise. (asm/ptrace.h): Likewise. (i386-nat.h): Likewise. * i386-linux-nat.c (i386-nat.h): Likewise. (regset.h): Likewise. (target.h): Likewise. (linux-nat.h): Likewise. (nat/linux-btrace.h): Likewise. (btrace.h): Likewise. (gdb_assert.h): Likewise. (string.h): Likewise. (sys/uio.h): Likewise. (sys/user.h): Likewise. (sys/procfs.h): Likewise. (sys/reg.h): Likewise. (sys/debugreg.h): Likewise. (ORIG_EAX): Remove definition. --- gdb/ChangeLog | 30 ++++++++++++++++++++++++++++++ gdb/amd64-linux-nat.c | 32 +++++--------------------------- gdb/i386-linux-nat.c | 33 +++------------------------------ 3 files changed, 38 insertions(+), 57 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 418b3e3dc51..afad8f31ff9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,33 @@ +2014-07-11 Gary Benson + + * amd64-linux-nat.c (gdbcore.h): Remove include. + (regset.h): Likewise. + (nat/linux-btrace.h): Likewise. + (btrace.h): Likewise. + (gdb_assert.h): Likewise. + (string.h): Likewise. + (sys/uio.h): Likewise. + (sys/debugreg.h): Likewise. + (sys/syscall.h): Likewise. + (sys/procfs.h): Likewise. + (sys/user.h): Likewise. + (asm/ptrace.h): Likewise. + (i386-nat.h): Likewise. + * i386-linux-nat.c (i386-nat.h): Likewise. + (regset.h): Likewise. + (target.h): Likewise. + (linux-nat.h): Likewise. + (nat/linux-btrace.h): Likewise. + (btrace.h): Likewise. + (gdb_assert.h): Likewise. + (string.h): Likewise. + (sys/uio.h): Likewise. + (sys/user.h): Likewise. + (sys/procfs.h): Likewise. + (sys/reg.h): Likewise. + (sys/debugreg.h): Likewise. + (ORIG_EAX): Remove definition. + 2014-07-11 Gary Benson * i386-linux-nat.h: New file. diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index 6b8d43a6dda..0885a0a8808 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -20,42 +20,20 @@ #include "defs.h" #include "inferior.h" -#include "gdbcore.h" #include "regcache.h" -#include "regset.h" -#include "linux-nat.h" -#include "amd64-linux-tdep.h" -#include "nat/linux-btrace.h" -#include "btrace.h" - -#include "gdb_assert.h" -#include #include "elf/common.h" -#include #include -#include -#include -#include -#include #include -/* FIXME ezannoni-2003-07-09: we need to be included after - because the latter redefines FS and GS for no apparent - reason, and those definitions don't match the ones that libpthread_db - uses, which come from . */ -/* ezannoni-2003-07-09: I think this is fixed. The extraneous defs have - been removed from ptrace.h in the kernel. However, better safe than - sorry. */ -#include #include -#include "gdb_proc_service.h" - -/* Prototypes for supply_gregset etc. */ #include "gregset.h" +#include "gdb_proc_service.h" +#include "amd64-nat.h" +#include "linux-nat.h" +#include "x86-linux-nat.h" #include "amd64-tdep.h" +#include "amd64-linux-tdep.h" #include "i386-linux-tdep.h" -#include "amd64-nat.h" -#include "i386-nat.h" #include "i386-xstate.h" #include "x86-linux-nat.h" diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 154cd12849e..bb0f2c8cca5 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -18,46 +18,19 @@ along with this program. If not, see . */ #include "defs.h" -#include "i386-nat.h" #include "inferior.h" #include "gdbcore.h" #include "regcache.h" -#include "regset.h" -#include "target.h" -#include "linux-nat.h" -#include "nat/linux-btrace.h" -#include "btrace.h" - -#include "gdb_assert.h" -#include #include "elf/common.h" -#include #include -#include -#include - -#ifdef HAVE_SYS_REG_H -#include -#endif - -#ifndef ORIG_EAX -#define ORIG_EAX -1 -#endif - -#ifdef HAVE_SYS_DEBUGREG_H -#include -#endif - -/* Prototypes for supply_gregset etc. */ #include "gregset.h" +#include "gdb_proc_service.h" +#include "x86-linux-nat.h" +#include "i386-linux-nat.h" #include "i387-tdep.h" #include "i386-tdep.h" #include "i386-linux-tdep.h" - -/* Defines ps_err_e, struct ps_prochandle. */ -#include "gdb_proc_service.h" - #include "i386-xstate.h" #include "x86-linux-nat.h" -- 2.30.2