[06/13] Move libiberty.h to common-defs.h

Message ID 1406644635-1011-7-git-send-email-gbenson@redhat.com
State Committed
Headers

Commit Message

Gary Benson July 29, 2014, 2:37 p.m. UTC
  This commit moves the inclusion of libiberty.h to common-defs.h and
removes all other inclusions.

gdb/
2014-07-28  Gary Benson  <gbenson@redhat.com>

	* common/common-defs.h: Include libiberty.h.
	* defs.h: Do not include libiberty.h.
	* common/queue.h: Likewise.
	* cp-name-parser.y: Likewise.
	* mi/mi-cmd-catch.c: Likewise.
	* python/python.c: Likewise.

gdb/gdbserver/
2014-07-28  Gary Benson  <gbenson@redhat.com>

	* server.h: Do not include libiberty.h.
	* linux-bfin-low.c: Likewise.
---
 gdb/ChangeLog                  |    9 +++++++++
 gdb/common/common-defs.h       |    1 +
 gdb/common/queue.h             |    1 -
 gdb/cp-name-parser.y           |    1 -
 gdb/defs.h                     |    1 -
 gdb/gdbserver/ChangeLog        |    5 +++++
 gdb/gdbserver/linux-bfin-low.c |    1 -
 gdb/gdbserver/server.h         |    1 -
 gdb/mi/mi-cmd-catch.c          |    1 -
 gdb/python/python.c            |    1 -
 10 files changed, 15 insertions(+), 7 deletions(-)
  

Patch

diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h
index 8106e68..eedc318 100644
--- a/gdb/common/common-defs.h
+++ b/gdb/common/common-defs.h
@@ -32,5 +32,6 @@ 
 #include <stdarg.h>
 #include <stddef.h>
 #include "ansidecl.h"
+#include "libiberty.h"
 
 #endif /* COMMON_DEFS_H */
diff --git a/gdb/common/queue.h b/gdb/common/queue.h
index 4ce53c3..34e4db3 100644
--- a/gdb/common/queue.h
+++ b/gdb/common/queue.h
@@ -20,7 +20,6 @@ 
 #ifndef QUEUE_H
 #define QUEUE_H
 
-#include "libiberty.h" /* xmalloc */
 #include "gdb_assert.h"
 
 /* These macros implement functions and structs for a general queue.
diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y
index 3199aff..0caadfa 100644
--- a/gdb/cp-name-parser.y
+++ b/gdb/cp-name-parser.y
@@ -35,7 +35,6 @@ 
 #include <string.h>
 
 #include "safe-ctype.h"
-#include "libiberty.h"
 #include "demangle.h"
 #include "cp-support.h"
 #include "gdb_assert.h"
diff --git a/gdb/defs.h b/gdb/defs.h
index b7b6de9..d9775e3 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -83,7 +83,6 @@ 
 #define O_BINARY 0
 #endif
 
-#include "libiberty.h"
 #include "hashtab.h"
 
 /* Rather than duplicate all the logic in BFD for figuring out what
diff --git a/gdb/gdbserver/linux-bfin-low.c b/gdb/gdbserver/linux-bfin-low.c
index 03aa132..4c10cac 100644
--- a/gdb/gdbserver/linux-bfin-low.c
+++ b/gdb/gdbserver/linux-bfin-low.c
@@ -21,7 +21,6 @@ 
 
 #include "server.h"
 #include "linux-low.h"
-#include "libiberty.h"
 #include <asm/ptrace.h>
 
 /* Defined in auto-generated file reg-bfin.c.  */
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 061cdcd..9ecd9e0 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -25,7 +25,6 @@ 
 #include "wincecompat.h"
 #endif
 
-#include "libiberty.h"
 #include "version.h"
 
 #ifdef HAVE_ERRNO_H
diff --git a/gdb/mi/mi-cmd-catch.c b/gdb/mi/mi-cmd-catch.c
index 038df59..6c63058 100644
--- a/gdb/mi/mi-cmd-catch.c
+++ b/gdb/mi/mi-cmd-catch.c
@@ -22,7 +22,6 @@ 
 #include "arch-utils.h"
 #include "breakpoint.h"
 #include "gdb.h"
-#include "libiberty.h"
 #include "ada-lang.h"
 #include "mi-cmds.h"
 #include "mi-getopt.h"
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 369a249..40c4ec9 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -86,7 +86,6 @@  const struct extension_language_defn extension_language_python =
 
 #ifdef HAVE_PYTHON
 
-#include "libiberty.h"
 #include "cli/cli-decode.h"
 #include "charset.h"
 #include "top.h"