Remove duplicate or commented-out #includes
authorTom Tromey <tom@tromey.com>
Sat, 19 Jan 2019 21:08:48 +0000 (14:08 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 21 Jan 2019 18:14:07 +0000 (11:14 -0700)
I wrote a little script to detect duplicate or commented-out #includes
and ran it on gdb.  This patch is the result.  Tested by rebuilding.

gdb/ChangeLog
2019-01-21  Tom Tromey  <tom@tromey.com>

* ui-out.c: Fix includes.
* tui/tui-source.c: Fix includes.
* target.c: Fix includes.
* remote.c: Fix includes.
* regcache.c: Fix includes.
* python/py-block.c: Fix includes.
* printcmd.c: Fix includes.
* or1k-tdep.c: Fix includes.
* mi/mi-main.c: Fix includes.
* m32r-tdep.c: Fix includes.
* csky-tdep.c: Fix includes.
* compile/compile-cplus-types.c: Fix includes.
* cli/cli-interp.c: Fix includes.

gdb/gdbserver/ChangeLog
2019-01-21  Tom Tromey  <tom@tromey.com>

* tracepoint.c: Fix includes.
* remote-utils.c: Fix includes.
* linux-x86-low.c: Fix includes.

gdb/stubs/ChangeLog
2019-01-21  Tom Tromey  <tom@tromey.com>

* ia64vms-stub.c: Fix includes.

20 files changed:
gdb/ChangeLog
gdb/cli/cli-interp.c
gdb/compile/compile-cplus-types.c
gdb/csky-tdep.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-x86-low.c
gdb/gdbserver/remote-utils.c
gdb/gdbserver/tracepoint.c
gdb/m32r-tdep.c
gdb/mi/mi-main.c
gdb/or1k-tdep.c
gdb/printcmd.c
gdb/python/py-block.c
gdb/regcache.c
gdb/remote.c
gdb/stubs/ChangeLog
gdb/stubs/ia64vms-stub.c
gdb/target.c
gdb/tui/tui-source.c
gdb/ui-out.c

index e495ff97066af2311fabb2bf9060eb40e76cb286..04e8c2d56f39c0246cb288a066c3d3a703990cb8 100644 (file)
@@ -1,3 +1,19 @@
+2019-01-21  Tom Tromey  <tom@tromey.com>
+
+       * ui-out.c: Fix includes.
+       * tui/tui-source.c: Fix includes.
+       * target.c: Fix includes.
+       * remote.c: Fix includes.
+       * regcache.c: Fix includes.
+       * python/py-block.c: Fix includes.
+       * printcmd.c: Fix includes.
+       * or1k-tdep.c: Fix includes.
+       * mi/mi-main.c: Fix includes.
+       * m32r-tdep.c: Fix includes.
+       * csky-tdep.c: Fix includes.
+       * compile/compile-cplus-types.c: Fix includes.
+       * cli/cli-interp.c: Fix includes.
+
 2019-01-21  Alan Hayward  <alan.hayward@arm.com>
 
        * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1): Check
index 8a3f65f088f8935a351374a4d332f7ba2a7dc49b..0299f3dcdd1287670642137cc91f2a2504ac4a39 100644 (file)
@@ -24,7 +24,6 @@
 #include "ui-out.h"
 #include "cli-out.h"
 #include "top.h"               /* for "execute_command" */
-#include "event-top.h"
 #include "infrun.h"
 #include "observable.h"
 #include "gdbthread.h"
index 910a874550d519af6e7c65cff0076a2eca52d009..97c4d3c707d7a68030bd5408e8ba4ea318c78ca0 100644 (file)
@@ -28,7 +28,6 @@
 #include "source.h"
 #include "cp-support.h"
 #include "cp-abi.h"
-#include "symtab.h"
 #include "objfiles.h"
 #include "block.h"
 #include "gdbcmd.h"
index ef8f29c5596545656778b3a466e1eb25837c4f11..1259ccaeb129253e77efce55b0a193ed6eb3c386 100644 (file)
 #include "dwarf2-frame.h"
 #include "user-regs.h"
 #include "valprint.h"
-#include "reggroups.h"
 #include "csky-tdep.h"
 #include "regset.h"
-#include "block.h"
 #include "opcode/csky.h"
 #include <algorithm>
 #include <vector>
index 02906cbcc1b408ba899d648e55f230ffe8421b46..5312ca99194a296d0f8d55c6c763be1d61c997f7 100644 (file)
@@ -1,3 +1,9 @@
+2019-01-21  Tom Tromey  <tom@tromey.com>
+
+       * tracepoint.c: Fix includes.
+       * remote-utils.c: Fix includes.
+       * linux-x86-low.c: Fix includes.
+
 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
 
        * gdbreplay.c (gdbreplay_version): Update copyright year in
index 99b0cc55ef95e3a2abd85582ab6f9fdb0a9c3549..056d06004635059380fa24e7598b6e153f0fb6f0 100644 (file)
@@ -72,7 +72,6 @@ static const char *xmltarget_amd64_linux_no_xml = "@<target>\
 
 #include <sys/reg.h>
 #include <sys/procfs.h>
-#include "nat/gdb_ptrace.h"
 #include <sys/uio.h>
 
 #ifndef PTRACE_GET_THREAD_AREA
index ef1b0ede3ae30a30d124dd2ecdf572839353772f..e7a2170bbd2098bad2772f3cf4f80cfbf60cd331 100644 (file)
@@ -25,7 +25,6 @@
 #include "tdesc.h"
 #include "dll.h"
 #include "rsp-low.h"
-#include "gdbthread.h"
 #include "netstuff.h"
 #include "filestuff.h"
 #include <ctype.h>
index c4af55749fc6e21b522d6a55a370efc19b7ce683..5fb8a5134ba3d5fa46e4328fb7ea19426e90571e 100644 (file)
@@ -7330,7 +7330,6 @@ gdb_agent_init (void)
 }
 
 #include <sys/mman.h>
-#include <fcntl.h>
 
 IP_AGENT_EXPORT_VAR char *gdb_tp_heap_buffer;
 IP_AGENT_EXPORT_VAR char *gdb_jump_pad_buffer;
index 3f17a5e0274fc7cfee6d64865a65c78bba829434..18acdb6990c7c885e3f08172a419328a8e015b33 100644 (file)
@@ -35,7 +35,6 @@
 #include "regcache.h"
 #include "trad-frame.h"
 #include "dis-asm.h"
-#include "objfiles.h"
 #include "m32r-tdep.h"
 #include <algorithm>
 
index dc96032b0d46deab472f00f94fd7c0d8f8d3cbbe..71769638454decfec59e834e33ea2fc452142e22 100644 (file)
@@ -43,7 +43,6 @@
 #include "mi-common.h"
 #include "language.h"
 #include "valprint.h"
-#include "inferior.h"
 #include "osdata.h"
 #include "common/gdb_splay_tree.h"
 #include "tracepoint.h"
index 9140ca2aabe05535e020007294351d7377b78670..13e130c6fd32e4e8cd5f141297695982a93d337c 100644 (file)
@@ -33,7 +33,6 @@
 #include "block.h"
 #include "reggroups.h"
 #include "arch-utils.h"
-#include "frame.h"
 #include "frame-unwind.h"
 #include "frame-base.h"
 #include "dwarf2-frame.h"
index e6fdbcf344e107773d1d43b802cf1ab7ab173c6a..cd2e5852352a59fc0daaab9c009d59e93abbfa27 100644 (file)
@@ -50,7 +50,6 @@
 #include "format.h"
 #include "source.h"
 #include "common/byte-vector.h"
-#include "cli/cli-style.h"
 
 /* Last specified output format.  */
 
index c6e68a107e3dd420244d912b39b73f4975e21116..90140ebc34ab9a87d6b3141273b60c3a37c104e4 100644 (file)
@@ -23,7 +23,6 @@
 #include "symtab.h"
 #include "python-internal.h"
 #include "objfiles.h"
-#include "symtab.h"
 
 typedef struct blpy_block_object {
   PyObject_HEAD
index c51ef771be8df702a40b97b6fbb3fda10b8974e8..4a68390c5f7c2e31ee1e7ce4f303fa84375c3f42 100644 (file)
@@ -1419,7 +1419,6 @@ register_dump::dump (ui_file *file)
 #if GDB_SELF_TEST
 #include "selftest.h"
 #include "selftest-arch.h"
-#include "gdbthread.h"
 #include "target-float.h"
 
 namespace selftests {
index 4e2c85a223a4097166621059714dfeefe2ba0fa2..4b3f2907b43806c158e6fda33e7e1a2d97ac40d1 100644 (file)
@@ -28,7 +28,6 @@
 #include "symfile.h"
 #include "target.h"
 #include "process-stratum-target.h"
-/*#include "terminal.h" */
 #include "gdbcmd.h"
 #include "objfiles.h"
 #include "gdb-stabs.h"
index 607fb8fcfa29a4865a13f68cf8ec7c47b3d9f9f1..3626f75c88e0854d8d7690bf8ffc2b6ec2b42caa 100644 (file)
@@ -1,3 +1,7 @@
+2019-01-21  Tom Tromey  <tom@tromey.com>
+
+       * ia64vms-stub.c: Fix includes.
+
 2012-12-19  Joel Brobecker  <brobecker@adacore.com>
 
        * buildvms.com: Add copyright header.
index 21119ec8ae936df9e03e61768a77edeaab5245d2..6e8ec4dee5bd61738a2bbd7b65b6c3c1971e9002 100644 (file)
@@ -56,7 +56,6 @@
 #include <builtins.h>
 #include <prtdef.h>
 #include <psldef.h>
-#include <ssdef.h>
 #include <chfdef.h>
 
 #include <lib_c/imcbdef.h>
index e66584f147ea4de47f37ed1c34538e18406e85c7..ad7eba3fa3c9cf613ade335d16ca37bb1ab0e867 100644 (file)
@@ -48,7 +48,6 @@
 #include <algorithm>
 #include "byte-vector.h"
 #include "terminal.h"
-#include <algorithm>
 #include <unordered_map>
 
 static void generic_tls_error (void) ATTRIBUTE_NORETURN;
index ed9562a93002906e09c47a1eeab0176d81f23401..a7e801eba2606cba761f0dd6b9285debf0d2aa4f 100644 (file)
@@ -25,7 +25,6 @@
 #include "frame.h"
 #include "breakpoint.h"
 #include "source.h"
-#include "symtab.h"
 #include "objfiles.h"
 #include "filenames.h"
 #include "source-cache.h"
index 7bcc2638aee7b21308a3ee168c0aeb4e44a94e62..6851fd29c6ab24ce4db54fa3ca8e2a46d1b2efce 100644 (file)
@@ -28,7 +28,6 @@
 #include <vector>
 #include <memory>
 #include <string>
-#include <memory>
 
 namespace {