From dc06243f6f87aa52222dab0ef45bb9a5119724da Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Wed, 24 Jun 2015 11:59:03 +0100 Subject: [PATCH] Remove redundant include directives. stdint.h was added to common-defs.h some months ago and should no longer be included directly by any file. gdb_assert.h was added to common-defs.h nearly a year ago, but three includes have crept in since then. This commit removes all such redundant include directives. gdb/ChangeLog: * common/buffer.c (stdint.h): Do not include. * common/print-utils.c (stdint.h): Likewise. * compile/compile-c-symbols.c (gdb_assert.h): Likewise. * compile/compile-c-types.c (gdb_assert.h): Likewise. * ft32-tdep.c (gdb_assert.h): Likewise. * guile/scm-utils.c (stdint.h): Likewise. * i386-linux-tdep.c (stdint.h): Likewise. * i386-tdep.c (stdint.h): Likewise. * nat/linux-btrace.c (stdint.h): Likewise. * nat/linux-btrace.h (stdint.h): Likewise. * nat/linux-ptrace.c (stdint.h): Likewise. * nat/mips-linux-watch.h (stdint.h): Likewise. * ppc-linux-nat.c (stdint.h): Likewise. * python/python-internal.h (stdint.h): Likewise. * stub-termcap.c (stdlib.h): Likewise. * target/target.h (stdint.h): Likewise. * xtensa-linux-nat.c (stdint.h): Likewise. gdb/gdbserver/ChangeLog: * linux-i386-ipa.c (stdint.h): Do not include. * lynx-i386-low.c (stdint.h): Likewise. * lynx-ppc-low.c (stdint.h): Likewise. * mem-break.c (stdint.h): Likewise. * thread-db.c (stdint.h): Likewise. * tracepoint.c (stdint.h): Likewise. * win32-low.c (stdint.h): Likewise. --- gdb/ChangeLog | 20 ++++++++++++++++++++ gdb/common/buffer.c | 2 -- gdb/common/print-utils.c | 2 -- gdb/compile/compile-c-symbols.c | 1 - gdb/compile/compile-c-types.c | 2 -- gdb/ft32-tdep.c | 2 -- gdb/gdbserver/ChangeLog | 10 ++++++++++ gdb/gdbserver/linux-i386-ipa.c | 1 - gdb/gdbserver/lynx-i386-low.c | 2 -- gdb/gdbserver/lynx-ppc-low.c | 2 -- gdb/gdbserver/mem-break.c | 2 -- gdb/gdbserver/thread-db.c | 2 -- gdb/gdbserver/tracepoint.c | 2 -- gdb/gdbserver/win32-low.c | 2 -- gdb/guile/scm-utils.c | 1 - gdb/i386-linux-tdep.c | 2 -- gdb/i386-tdep.c | 2 -- gdb/nat/linux-btrace.c | 2 -- gdb/nat/linux-btrace.h | 2 -- gdb/nat/linux-ptrace.c | 2 -- gdb/nat/mips-linux-watch.h | 2 -- gdb/ppc-linux-nat.c | 2 -- gdb/python/python-internal.h | 2 -- gdb/stub-termcap.c | 2 -- gdb/target/target.h | 2 -- gdb/xtensa-linux-nat.c | 2 -- 26 files changed, 30 insertions(+), 45 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 99ff2fb22c6..0d0fe107ad7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,23 @@ +2015-06-24 Gary Benson + + * common/buffer.c (stdint.h): Do not include. + * common/print-utils.c (stdint.h): Likewise. + * compile/compile-c-symbols.c (gdb_assert.h): Likewise. + * compile/compile-c-types.c (gdb_assert.h): Likewise. + * ft32-tdep.c (gdb_assert.h): Likewise. + * guile/scm-utils.c (stdint.h): Likewise. + * i386-linux-tdep.c (stdint.h): Likewise. + * i386-tdep.c (stdint.h): Likewise. + * nat/linux-btrace.c (stdint.h): Likewise. + * nat/linux-btrace.h (stdint.h): Likewise. + * nat/linux-ptrace.c (stdint.h): Likewise. + * nat/mips-linux-watch.h (stdint.h): Likewise. + * ppc-linux-nat.c (stdint.h): Likewise. + * python/python-internal.h (stdint.h): Likewise. + * stub-termcap.c (stdlib.h): Likewise. + * target/target.h (stdint.h): Likewise. + * xtensa-linux-nat.c (stdint.h): Likewise. + 2015-06-23 Patrick Palka * top.c (init_history): Look at errno after calling strtol to diff --git a/gdb/common/buffer.c b/gdb/common/buffer.c index 28b2625f069..ca1636dcd73 100644 --- a/gdb/common/buffer.c +++ b/gdb/common/buffer.c @@ -21,8 +21,6 @@ #include "xml-utils.h" #include "buffer.h" #include "inttypes.h" -#include - void buffer_grow (struct buffer *buffer, const char *data, size_t size) { diff --git a/gdb/common/print-utils.c b/gdb/common/print-utils.c index c8ff1332f72..1c1a5c1fd4b 100644 --- a/gdb/common/print-utils.c +++ b/gdb/common/print-utils.c @@ -19,8 +19,6 @@ #include "common-defs.h" #include "print-utils.h" -#include - /* Temporary storage using circular buffer. */ #define NUMCELLS 16 diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index 455114c4c17..68d38ba2f71 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -20,7 +20,6 @@ #include "defs.h" #include "compile-internal.h" -#include "gdb_assert.h" #include "symtab.h" #include "parser-defs.h" #include "block.h" diff --git a/gdb/compile/compile-c-types.c b/gdb/compile/compile-c-types.c index 2b521bcb72f..22f5a9d8399 100644 --- a/gdb/compile/compile-c-types.c +++ b/gdb/compile/compile-c-types.c @@ -21,8 +21,6 @@ #include "defs.h" #include "gdbtypes.h" #include "compile-internal.h" -#include "gdb_assert.h" - /* An object that maps a gdb type to a gcc type. */ struct type_map_instance diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c index 41a71919766..e7f4d1a6061 100644 --- a/gdb/ft32-tdep.c +++ b/gdb/ft32-tdep.c @@ -37,8 +37,6 @@ #include "dis-asm.h" #include "record.h" -#include "gdb_assert.h" - #include "ft32-tdep.h" #include "gdb/sim-ft32.h" diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 7c380c146db..2528f0f5d11 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,13 @@ +2015-06-24 Gary Benson + + * linux-i386-ipa.c (stdint.h): Do not include. + * lynx-i386-low.c (stdint.h): Likewise. + * lynx-ppc-low.c (stdint.h): Likewise. + * mem-break.c (stdint.h): Likewise. + * thread-db.c (stdint.h): Likewise. + * tracepoint.c (stdint.h): Likewise. + * win32-low.c (stdint.h): Likewise. + 2015-06-18 Simon Marchi * server.c (write_qxfer_response): Update call to diff --git a/gdb/gdbserver/linux-i386-ipa.c b/gdb/gdbserver/linux-i386-ipa.c index eb30dcd700a..de8d3946509 100644 --- a/gdb/gdbserver/linux-i386-ipa.c +++ b/gdb/gdbserver/linux-i386-ipa.c @@ -19,7 +19,6 @@ along with this program. If not, see . */ #include "server.h" -#include #include #include "tracepoint.h" diff --git a/gdb/gdbserver/lynx-i386-low.c b/gdb/gdbserver/lynx-i386-low.c index bd588c6424b..6b5a224b7aa 100644 --- a/gdb/gdbserver/lynx-i386-low.c +++ b/gdb/gdbserver/lynx-i386-low.c @@ -17,8 +17,6 @@ #include "server.h" #include "lynx-low.h" - -#include #include #include diff --git a/gdb/gdbserver/lynx-ppc-low.c b/gdb/gdbserver/lynx-ppc-low.c index 51d450f13a1..0f31eaf71a8 100644 --- a/gdb/gdbserver/lynx-ppc-low.c +++ b/gdb/gdbserver/lynx-ppc-low.c @@ -17,8 +17,6 @@ #include "server.h" #include "lynx-low.h" - -#include #include #include diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c index d1b66bf1eeb..4eaa52bffba 100644 --- a/gdb/gdbserver/mem-break.c +++ b/gdb/gdbserver/mem-break.c @@ -21,8 +21,6 @@ #include "server.h" #include "regcache.h" #include "ax.h" -#include - const unsigned char *breakpoint_data; int breakpoint_len; diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c index 5bf808e2282..4288fdb9d31 100644 --- a/gdb/gdbserver/thread-db.c +++ b/gdb/gdbserver/thread-db.c @@ -34,8 +34,6 @@ static int thread_db_use_events; #ifndef USE_LIBTHREAD_DB_DIRECTLY #include #endif - -#include #include #include diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 3ce958066f7..b5f252a5350 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -27,8 +27,6 @@ #include #include #include -#include - #include "ax.h" #include "tdesc.h" diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index 699115ca6ba..64caf248393 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -26,8 +26,6 @@ #include "gdbthread.h" #include "dll.h" #include "hostio.h" - -#include #include #include #include diff --git a/gdb/guile/scm-utils.c b/gdb/guile/scm-utils.c index 59d8b5281bc..07401e6476e 100644 --- a/gdb/guile/scm-utils.c +++ b/gdb/guile/scm-utils.c @@ -21,7 +21,6 @@ conventions, et.al. */ #include "defs.h" -#include #include "guile-internal.h" /* Define VARIABLES in the gdb module. */ diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 061ad3a74c1..7c2e322f8aa 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -44,8 +44,6 @@ #include "record-full.h" #include "linux-record.h" -#include - #include "features/i386/i386-linux.c" #include "features/i386/i386-mmx-linux.c" #include "features/i386/i386-mpx-linux.c" diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 42d0346bfba..85e433e6e54 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -50,8 +50,6 @@ #include "record.h" #include "record-full.h" -#include - #include "features/i386/i386.c" #include "features/i386/i386-avx.c" #include "features/i386/i386-mpx.c" diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c index e7aff5e4ad3..cd7f3d15500 100644 --- a/gdb/nat/linux-btrace.c +++ b/gdb/nat/linux-btrace.c @@ -30,8 +30,6 @@ #endif #if HAVE_LINUX_PERF_EVENT_H && defined(SYS_perf_event_open) - -#include #include #include #include diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h index 12cdcde596e..bb4a8c56407 100644 --- a/gdb/nat/linux-btrace.h +++ b/gdb/nat/linux-btrace.h @@ -24,8 +24,6 @@ #include "btrace-common.h" #include "vec.h" -#include - #if HAVE_LINUX_PERF_EVENT_H # include #endif diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c index fb126060001..1a926f93156 100644 --- a/gdb/nat/linux-ptrace.c +++ b/gdb/nat/linux-ptrace.c @@ -23,8 +23,6 @@ #include "buffer.h" #include "gdb_wait.h" -#include - /* Stores the ptrace options supported by the running kernel. A value of -1 means we did not check for features yet. A value of 0 means there are no supported features. */ diff --git a/gdb/nat/mips-linux-watch.h b/gdb/nat/mips-linux-watch.h index 571cde4d351..10ed6ba574c 100644 --- a/gdb/nat/mips-linux-watch.h +++ b/gdb/nat/mips-linux-watch.h @@ -19,8 +19,6 @@ #define MIPS_LINUX_WATCH_H 1 #include -#include - #include "break-common.h" #define MAX_DEBUG_REGISTER 8 diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 88ca49e3d44..4ed03d0204d 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -26,8 +26,6 @@ #include "regcache.h" #include "target.h" #include "linux-nat.h" - -#include #include #include #include diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index f881559d292..ee949b7025c 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -65,8 +65,6 @@ /* Python 2.4 doesn't include stdint.h soon enough to get {u,}intptr_t needed by pyport.h. */ -#include - /* /usr/include/features.h on linux systems will define _POSIX_C_SOURCE if it sees _GNU_SOURCE (which config.h will define). pyconfig.h defines _POSIX_C_SOURCE to a different value than diff --git a/gdb/stub-termcap.c b/gdb/stub-termcap.c index 722929f741c..2ee1c04469f 100644 --- a/gdb/stub-termcap.c +++ b/gdb/stub-termcap.c @@ -22,8 +22,6 @@ #include "defs.h" -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/gdb/target/target.h b/gdb/target/target.h index 05ac7581177..6ee0feeec0b 100644 --- a/gdb/target/target.h +++ b/gdb/target/target.h @@ -21,8 +21,6 @@ #define TARGET_COMMON_H #include "target/waitstatus.h" -#include - /* This header is a stopgap until more code is shared. */ /* Read LEN bytes of target memory at address MEMADDR, placing the diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c index 921bc99644b..fa627320d6f 100644 --- a/gdb/xtensa-linux-nat.c +++ b/gdb/xtensa-linux-nat.c @@ -24,8 +24,6 @@ #include "regcache.h" #include "target.h" #include "linux-nat.h" - -#include #include #include #include -- 2.30.2