aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-19 14:08:48 -0700
committerTom Tromey <tom@tromey.com>2019-01-21 11:14:07 -0700
commitbe6d4f74c77c6f521afc873d226480e001cb99c2 (patch)
tree15753099cdbd7e43f60d4bd72890519734ef40e8 /gdb
parentd7167c671da0323daf31a8e07945c57c25f858d2 (diff)
downloadgdb-be6d4f74c77c6f521afc873d226480e001cb99c2.zip
gdb-be6d4f74c77c6f521afc873d226480e001cb99c2.tar.gz
gdb-be6d4f74c77c6f521afc873d226480e001cb99c2.tar.bz2
Remove duplicate or commented-out #includes
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog16
-rw-r--r--gdb/cli/cli-interp.c1
-rw-r--r--gdb/compile/compile-cplus-types.c1
-rw-r--r--gdb/csky-tdep.c2
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/linux-x86-low.c1
-rw-r--r--gdb/gdbserver/remote-utils.c1
-rw-r--r--gdb/gdbserver/tracepoint.c1
-rw-r--r--gdb/m32r-tdep.c1
-rw-r--r--gdb/mi/mi-main.c1
-rw-r--r--gdb/or1k-tdep.c1
-rw-r--r--gdb/printcmd.c1
-rw-r--r--gdb/python/py-block.c1
-rw-r--r--gdb/regcache.c1
-rw-r--r--gdb/remote.c1
-rw-r--r--gdb/stubs/ChangeLog4
-rw-r--r--gdb/stubs/ia64vms-stub.c1
-rw-r--r--gdb/target.c1
-rw-r--r--gdb/tui/tui-source.c1
-rw-r--r--gdb/ui-out.c1
20 files changed, 26 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e495ff9..04e8c2d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 8a3f65f..0299f3d 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -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"
diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c
index 910a874..97c4d3c 100644
--- a/gdb/compile/compile-cplus-types.c
+++ b/gdb/compile/compile-cplus-types.c
@@ -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"
diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index ef8f29c..1259cca 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -52,10 +52,8 @@
#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>
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 02906cb..5312ca9 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -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
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index 99b0cc5..056d060 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -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
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index ef1b0ed..e7a2170 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -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>
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index c4af557..5fb8a51 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -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;
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 3f17a5e..18acdb6 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -35,7 +35,6 @@
#include "regcache.h"
#include "trad-frame.h"
#include "dis-asm.h"
-#include "objfiles.h"
#include "m32r-tdep.h"
#include <algorithm>
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index dc96032..7176963 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -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"
diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c
index 9140ca2..13e130c 100644
--- a/gdb/or1k-tdep.c
+++ b/gdb/or1k-tdep.c
@@ -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"
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index e6fdbcf..cd2e585 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -50,7 +50,6 @@
#include "format.h"
#include "source.h"
#include "common/byte-vector.h"
-#include "cli/cli-style.h"
/* Last specified output format. */
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index c6e68a1..90140eb 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -23,7 +23,6 @@
#include "symtab.h"
#include "python-internal.h"
#include "objfiles.h"
-#include "symtab.h"
typedef struct blpy_block_object {
PyObject_HEAD
diff --git a/gdb/regcache.c b/gdb/regcache.c
index c51ef77..4a68390 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -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 {
diff --git a/gdb/remote.c b/gdb/remote.c
index 4e2c85a..4b3f290 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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"
diff --git a/gdb/stubs/ChangeLog b/gdb/stubs/ChangeLog
index 607fb8f..3626f75 100644
--- a/gdb/stubs/ChangeLog
+++ b/gdb/stubs/ChangeLog
@@ -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.
diff --git a/gdb/stubs/ia64vms-stub.c b/gdb/stubs/ia64vms-stub.c
index 21119ec..6e8ec4d 100644
--- a/gdb/stubs/ia64vms-stub.c
+++ b/gdb/stubs/ia64vms-stub.c
@@ -56,7 +56,6 @@
#include <builtins.h>
#include <prtdef.h>
#include <psldef.h>
-#include <ssdef.h>
#include <chfdef.h>
#include <lib_c/imcbdef.h>
diff --git a/gdb/target.c b/gdb/target.c
index e66584f..ad7eba3 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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;
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index ed9562a..a7e801e 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -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"
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 7bcc263..6851fd2 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -28,7 +28,6 @@
#include <vector>
#include <memory>
#include <string>
-#include <memory>
namespace {