This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Remove duplicated include in gdb directory


This patch simply removes duplicated include statements in gdb directory.
If there are two duplicate include statements, this patch keeps the first
include and removes the second include.
Those are found by checkincludes.pl tool in linux kernel and double checked
manually once again if the include statements are affected by ifdef macro.

Signed-off-by: Honggyu Kim <nexus226@gmail.com>
---
 gdb/ada-lang.c          |    1 -
 gdb/alphabsd-nat.c      |    1 -
 gdb/amd64-darwin-tdep.c |    2 --
 gdb/amd64fbsd-nat.c     |    1 -
 gdb/auto-load.c         |    1 -
 gdb/ax-gdb.c            |    1 -
 gdb/breakpoint.c        |    1 -
 gdb/dbxread.c           |    1 -
 gdb/defs.h              |    4 ----
 gdb/fork-child.c        |    1 -
 gdb/gdb_usleep.c        |    1 -
 gdb/i386-darwin-tdep.c  |    2 --
 gdb/i386fbsd-nat.c      |    1 -
 gdb/infcmd.c            |    1 -
 gdb/inferior.c          |    1 -
 gdb/jv-lang.c           |    2 --
 gdb/linux-nat.c         |    2 --
 gdb/linux-tdep.c        |    1 -
 gdb/m68kbsd-nat.c       |    1 -
 gdb/m68klinux-nat.c     |    2 --
 gdb/microblaze-tdep.c   |    1 -
 gdb/mips-linux-tdep.c   |    1 -
 gdb/mn10300-tdep.c      |    1 -
 gdb/opencl-lang.c       |    1 -
 gdb/osdata.c            |    2 --
 gdb/printcmd.c          |    1 -
 gdb/regcache.c          |    1 -
 gdb/remote-m32r-sdi.c   |    1 -
 gdb/remote.c            |    1 -
 gdb/tilegx-linux-nat.c  |    5 +----
 gdb/tilegx-tdep.c       |    1 -
 gdb/tracepoint.c        |    2 --
 gdb/valops.c            |    2 --
 gdb/vaxbsd-nat.c        |    1 -
 gdb/windows-nat.c       |    1 -
 gdb/xtensa-tdep.c       |    1 -
 36 files changed, 1 insertion(+), 50 deletions(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 9ff3ab9..db5651c 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -63,7 +63,6 @@
 #include "value.h"
 #include "mi/mi-common.h"
 #include "arch-utils.h"
-#include "exceptions.h"
 #include "cli/cli-utils.h"
 
 /* Define whether or not the C operator '/' truncates towards zero for
diff --git a/gdb/alphabsd-nat.c b/gdb/alphabsd-nat.c
index 8e6942f..8d1e125 100644
--- a/gdb/alphabsd-nat.c
+++ b/gdb/alphabsd-nat.c
@@ -157,7 +157,6 @@ alphabsd_store_inferior_registers (struct target_ops *ops,
 
 /* Support for debugging kernel virtual memory images.  */
 
-#include <sys/types.h>
 #include <sys/signal.h>
 #include <machine/pcb.h>
 
diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c
index ec3a636..c50e0f2 100644
--- a/gdb/amd64-darwin-tdep.c
+++ b/gdb/amd64-darwin-tdep.c
@@ -33,8 +33,6 @@
 #include "amd64-tdep.h"
 #include "osabi.h"
 #include "ui-out.h"
-#include "symtab.h"
-#include "frame.h"
 #include "amd64-darwin-tdep.h"
 #include "i386-darwin-tdep.h"
 #include "solib.h"
diff --git a/gdb/amd64fbsd-nat.c b/gdb/amd64fbsd-nat.c
index eb30831..1371b04 100644
--- a/gdb/amd64fbsd-nat.c
+++ b/gdb/amd64fbsd-nat.c
@@ -95,7 +95,6 @@ static int amd64fbsd32_r_reg_offset[I386_NUM_GREGS] =
 
 /* Support for debugging kernel virtual memory images.  */
 
-#include <sys/types.h>
 #include <machine/pcb.h>
 #include <osreldate.h>
 
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 4eb7cdd..b507186 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -35,7 +35,6 @@
 #include "gdb_vecs.h"
 #include "readline/tilde.h"
 #include "completer.h"
-#include "observer.h"
 #include "fnmatch.h"
 #include "top.h"
 #include "filestuff.h"
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 4196655..f30cbeb 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -34,7 +34,6 @@
 #include "block.h"
 #include "regcache.h"
 #include "user-regs.h"
-#include "language.h"
 #include "dictionary.h"
 #include "breakpoint.h"
 #include "tracepoint.h"
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c630b87..61c22fb 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -66,7 +66,6 @@
 #include "continuations.h"
 #include "stack.h"
 #include "skip.h"
-#include "gdb_regex.h"
 #include "ax-gdb.h"
 #include "dummy-frame.h"
 
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 00949ac..8e2db45 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -58,7 +58,6 @@
 #include "block.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
 
 #include "aout/aout64.h"
 #include "aout/stab_gnu.h"	/* We always use GNU stabs, not
diff --git a/gdb/defs.h b/gdb/defs.h
index b1caaad..7a91ad5 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -606,10 +606,6 @@ enum gdb_osabi
 
 /* From other system libraries */
 
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index 6820872..c582403 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -27,7 +27,6 @@
 #include "gdb_wait.h"
 #include "gdb_vfork.h"
 #include "gdbcore.h"
-#include "terminal.h"
 #include "gdbthread.h"
 #include "command.h" /* for dont_repeat () */
 #include "gdbcmd.h"
diff --git a/gdb/gdb_usleep.c b/gdb/gdb_usleep.c
index 22c1475..f88c4ac 100644
--- a/gdb/gdb_usleep.c
+++ b/gdb/gdb_usleep.c
@@ -18,7 +18,6 @@
 #include "defs.h"
 #include "gdb_usleep.h"
 #include "gdb_select.h"
-#include "gdb_usleep.h"
 
 #include <sys/time.h>
 
diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c
index f458aec..c6195ba 100644
--- a/gdb/i386-darwin-tdep.c
+++ b/gdb/i386-darwin-tdep.c
@@ -33,8 +33,6 @@
 #include "i386-tdep.h"
 #include "osabi.h"
 #include "ui-out.h"
-#include "symtab.h"
-#include "frame.h"
 #include "gdb_assert.h"
 #include "i386-darwin-tdep.h"
 #include "solib.h"
diff --git a/gdb/i386fbsd-nat.c b/gdb/i386fbsd-nat.c
index a422f7c..f504962 100644
--- a/gdb/i386fbsd-nat.c
+++ b/gdb/i386fbsd-nat.c
@@ -82,7 +82,6 @@ i386fbsd_resume (struct target_ops *ops,
 
 /* Support for debugging kernel virtual memory images.  */
 
-#include <sys/types.h>
 #include <machine/pcb.h>
 
 #include "bsd-kvm.h"
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 20f8857..5fb2bb6 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -32,7 +32,6 @@
 #include "gdbcore.h"
 #include "target.h"
 #include "language.h"
-#include "symfile.h"
 #include "objfiles.h"
 #include "completer.h"
 #include "ui-out.h"
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 28a5200..e4a37aa 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -27,7 +27,6 @@
 #include "gdbthread.h"
 #include "ui-out.h"
 #include "observer.h"
-#include "gdbthread.h"
 #include "gdbcore.h"
 #include "symfile.h"
 #include "environ.h"
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index 63bcc98..3e69b90 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -23,8 +23,6 @@
 #include "expression.h"
 #include "parser-defs.h"
 #include "language.h"
-#include "gdbtypes.h"
-#include "symtab.h"
 #include "symfile.h"
 #include "objfiles.h"
 #include "gdb_string.h"
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 4784a5e..5a41837 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -46,7 +46,6 @@
 #include "gregset.h"		/* for gregset */
 #include "gdbcore.h"		/* for get_exec_file */
 #include <ctype.h>		/* for isdigit */
-#include "gdbthread.h"		/* for struct thread_info etc.  */
 #include "gdb_stat.h"		/* for struct stat */
 #include <fcntl.h>		/* for O_RDONLY */
 #include "inf-loop.h"
@@ -65,7 +64,6 @@
 #include "agent.h"
 #include "tracepoint.h"
 #include "exceptions.h"
-#include "linux-ptrace.h"
 #include "buffer.h"
 #include "target-descriptions.h"
 #include "filestuff.h"
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index eb8ea2b..316973b 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -32,7 +32,6 @@
 #include "cli/cli-utils.h"
 #include "arch-utils.h"
 #include "gdb_obstack.h"
-#include "cli/cli-utils.h"
 
 #include <ctype.h>
 
diff --git a/gdb/m68kbsd-nat.c b/gdb/m68kbsd-nat.c
index 3792959..457f39e 100644
--- a/gdb/m68kbsd-nat.c
+++ b/gdb/m68kbsd-nat.c
@@ -176,7 +176,6 @@ m68kbsd_store_inferior_registers (struct target_ops *ops,
 
 /* Support for debugging kernel virtual memory images.  */
 
-#include <sys/types.h>
 #include <machine/pcb.h>
 
 #include "bsd-kvm.h"
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index 5e928e6..5d218af 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -46,8 +46,6 @@
 
 #include "floatformat.h"
 
-#include "target.h"
-
 /* Prototypes for supply_gregset etc.  */
 #include "gregset.h"
 
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index dcf556f..a7e4f35 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -29,7 +29,6 @@
 #include "inferior.h"
 #include "regcache.h"
 #include "target.h"
-#include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
 #include "dwarf2-frame.h"
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 8d17839..72097ab 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -32,7 +32,6 @@
 #include "gdbtypes.h"
 #include "objfiles.h"
 #include "solib.h"
-#include "solib-svr4.h"
 #include "solist.h"
 #include "symtab.h"
 #include "target-descriptions.h"
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 32aa5f5..963ffad 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -26,7 +26,6 @@
 #include "gdb_assert.h"
 #include "gdbcore.h"	/* For write_memory_unsigned_integer.  */
 #include "value.h"
-#include "gdbtypes.h"
 #include "frame.h"
 #include "frame-unwind.h"
 #include "frame-base.h"
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index 4720e2b..b47be22 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -24,7 +24,6 @@
 #include "symtab.h"
 #include "expression.h"
 #include "parser-defs.h"
-#include "symtab.h"
 #include "language.h"
 #include "c-lang.h"
 #include "gdb_assert.h"
diff --git a/gdb/osdata.c b/gdb/osdata.c
index a19b21d..48cd976 100644
--- a/gdb/osdata.c
+++ b/gdb/osdata.c
@@ -45,8 +45,6 @@ osdata_parse (const char *xml)
 
 #else /* HAVE_LIBEXPAT */
 
-#include "xml-support.h"
-
 /* Internal parsing data passed to all XML callbacks.  */
 struct osdata_parsing_data
   {
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 9bca6dd..6848398 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -41,7 +41,6 @@
 #include "block.h"
 #include "disasm.h"
 #include "dfp.h"
-#include "valprint.h"
 #include "exceptions.h"
 #include "observer.h"
 #include "solist.h"
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 7ec75c8..314254c 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -26,7 +26,6 @@
 #include "reggroups.h"
 #include "gdb_assert.h"
 #include "gdb_string.h"
-#include "gdbcmd.h"		/* For maintenanceprintlist.  */
 #include "observer.h"
 #include "exceptions.h"
 #include "remote.h"
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index 81fea53..cba717a 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -37,7 +37,6 @@
 #endif
 #include <sys/types.h>
 #include <sys/time.h>
-#include <signal.h>
 #include <time.h>
 #include "gdb_bfd.h"
 #include "cli/cli-utils.h"
diff --git a/gdb/remote.c b/gdb/remote.c
index a2e8a01..7f955b7 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -46,7 +46,6 @@
 #include "gdb_bfd.h"
 #include "filestuff.h"
 
-#include <ctype.h>
 #include <sys/time.h>
 
 #include "event-loop.h"
diff --git a/gdb/tilegx-linux-nat.c b/gdb/tilegx-linux-nat.c
index 39c62ac..b4ec2b6 100644
--- a/gdb/tilegx-linux-nat.c
+++ b/gdb/tilegx-linux-nat.c
@@ -30,15 +30,12 @@
 
 #include <sys/procfs.h>
 
+/* Defines ps_err_e, struct ps_prochandle.  */
 #include "gdb_proc_service.h"
-#include <sys/ptrace.h>
 
 /* Prototypes for supply_gregset etc.  */
 #include "gregset.h"
 
-/* Defines ps_err_e, struct ps_prochandle.  */
-#include "gdb_proc_service.h"
-
 /* The register sets used in GNU/Linux ELF core-dumps are identical to
    the register sets in `struct user' that is used for a.out
    core-dumps, and is also used by `ptrace'.  The corresponding types
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index a476053..41def61 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -41,7 +41,6 @@
 #include "linux-tdep.h"
 #include "objfiles.h"
 #include "solib-svr4.h"
-#include "symtab.h"
 #include "tilegx-tdep.h"
 #include "opcode/tilegx.h"
 
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index c086587..b793ed3 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -44,7 +44,6 @@
 #include "filenames.h"
 #include "gdbthread.h"
 #include "stack.h"
-#include "gdbcore.h"
 #include "remote.h"
 #include "source.h"
 #include "ax.h"
@@ -54,7 +53,6 @@
 #include "cli/cli-utils.h"
 #include "probe.h"
 #include "ctf.h"
-#include "completer.h"
 #include "filestuff.h"
 
 /* readline include files */
diff --git a/gdb/valops.c b/gdb/valops.c
index 15fd7c3..3d63e87 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -39,10 +39,8 @@
 #include <errno.h>
 #include "gdb_string.h"
 #include "gdb_assert.h"
-#include "cp-support.h"
 #include "observer.h"
 #include "objfiles.h"
-#include "symtab.h"
 #include "exceptions.h"
 
 extern unsigned int overload_debug;
diff --git a/gdb/vaxbsd-nat.c b/gdb/vaxbsd-nat.c
index a88b8dc..11a245a 100644
--- a/gdb/vaxbsd-nat.c
+++ b/gdb/vaxbsd-nat.c
@@ -98,7 +98,6 @@ vaxbsd_store_inferior_registers (struct target_ops *ops,
 
 /* Support for debugging kernel virtual memory images.  */
 
-#include <sys/types.h>
 #include <machine/pcb.h>
 
 #include "bsd-kvm.h"
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 24b97ab..0b2e02d 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -43,7 +43,6 @@
 #include <sys/cygwin.h>
 #include <cygwin/version.h>
 #endif
-#include <signal.h>
 
 #include "buildsym.h"
 #include "filenames.h"
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index d9b1a45..5aaae47 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -37,7 +37,6 @@
 #include "dwarf2.h"
 #include "dwarf2-frame.h"
 #include "dwarf2loc.h"
-#include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
 
-- 
1.7.9.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]