aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-12-21 16:38:32 -0700
committerTom Tromey <tom@tromey.com>2022-01-18 10:14:42 -0700
commitbf31fd38f02ca9b1a7d75e2d00ee0af665fd3efd (patch)
tree58e96e35f1c5da782d5b975dd4ec565873a45e55 /gdb
parent7904e9613e0a2fc38e9abc06a916dea6a009c7b4 (diff)
downloadgdb-bf31fd38f02ca9b1a7d75e2d00ee0af665fd3efd.zip
gdb-bf31fd38f02ca9b1a7d75e2d00ee0af665fd3efd.tar.gz
gdb-bf31fd38f02ca9b1a7d75e2d00ee0af665fd3efd.tar.bz2
Move gdb obstack code to gdbsupport
This moves the gdb-specific obstack code -- both extensions like obconcat and obstack_strdup, and things like auto_obstack -- to gdbsupport.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/ada-lang.c2
-rw-r--r--gdb/addrmap.c2
-rw-r--r--gdb/bcache.c2
-rw-r--r--gdb/block.c2
-rw-r--r--gdb/break-catch-throw.c2
-rw-r--r--gdb/bsd-uthread.c2
-rw-r--r--gdb/buildsym.c2
-rw-r--r--gdb/buildsym.h2
-rw-r--r--gdb/c-lang.c2
-rw-r--r--gdb/c-typeprint.c2
-rw-r--r--gdb/charset.c2
-rw-r--r--gdb/coffread.c2
-rw-r--r--gdb/cp-namespace.c2
-rw-r--r--gdb/cp-support.h2
-rw-r--r--gdb/cp-valprint.c2
-rw-r--r--gdb/d-namespace.c2
-rw-r--r--gdb/dbxread.c2
-rw-r--r--gdb/dictionary.c2
-rw-r--r--gdb/dwarf2/read.h2
-rw-r--r--gdb/eval.c2
-rw-r--r--gdb/f-typeprint.c2
-rw-r--r--gdb/frame-base.c2
-rw-r--r--gdb/frame-unwind.c2
-rw-r--r--gdb/frame.c2
-rw-r--r--gdb/gdb_obstack.c47
-rw-r--r--gdb/gdb_obstack.h156
-rw-r--r--gdb/gdbarch.h2
-rw-r--r--gdb/gdbtypes.h2
-rw-r--r--gdb/gnu-nat.c2
-rw-r--r--gdb/go-lang.c2
-rw-r--r--gdb/i386-windows-tdep.c2
-rw-r--r--gdb/linux-tdep.c2
-rw-r--r--gdb/m2-typeprint.c2
-rw-r--r--gdb/macroexp.c2
-rw-r--r--gdb/macrotab.c2
-rw-r--r--gdb/mdebugread.c2
-rw-r--r--gdb/mi/mi-cmd-break.c2
-rw-r--r--gdb/namespace.h2
-rw-r--r--gdb/objfiles.c2
-rw-r--r--gdb/objfiles.h2
-rw-r--r--gdb/p-typeprint.c2
-rw-r--r--gdb/p-valprint.c2
-rw-r--r--gdb/psymtab.h2
-rw-r--r--gdb/python/py-unwind.c2
-rw-r--r--gdb/reggroups.c2
-rw-r--r--gdb/rust-parse.c2
-rw-r--r--gdb/stabsread.c2
-rw-r--r--gdb/symfile.c2
-rw-r--r--gdb/symmisc.c2
-rw-r--r--gdb/symtab.c2
-rw-r--r--gdb/symtab.h2
-rw-r--r--gdb/target-descriptions.c2
-rw-r--r--gdb/typeprint.c2
-rw-r--r--gdb/typeprint.h2
-rw-r--r--gdb/ui-file.c2
-rw-r--r--gdb/utils.c2
-rw-r--r--gdb/valprint.c2
-rw-r--r--gdb/windows-nat.c2
-rw-r--r--gdb/windows-tdep.c2
-rw-r--r--gdb/xml-support.h2
61 files changed, 58 insertions, 263 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index d0db5fb..ce9f1ad 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1074,7 +1074,6 @@ COMMON_SFILES = \
gcore.c \
gdb-demangle.c \
gdb_bfd.c \
- gdb_obstack.c \
gdb_regex.c \
gdbtypes.c \
gmp-utils.c \
@@ -1316,7 +1315,6 @@ HFILES_NO_SRCDIR = \
gdb_bfd.h \
gdb_curses.h \
gdb_expat.h \
- gdb_obstack.h \
gdb_proc_service.h \
gdb_regex.h \
gdb_select.h \
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index f2f8617..b88b27b 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -35,7 +35,7 @@
#include "breakpoint.h"
#include "gdbcore.h"
#include "hashtab.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "ada-lang.h"
#include "completer.h"
#include "ui-out.h"
diff --git a/gdb/addrmap.c b/gdb/addrmap.c
index a35eeed..bf30faa 100644
--- a/gdb/addrmap.c
+++ b/gdb/addrmap.c
@@ -19,7 +19,7 @@
#include "defs.h"
#include "splay-tree.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "addrmap.h"
#include "gdbsupport/selftest.h"
diff --git a/gdb/bcache.c b/gdb/bcache.c
index c8a5b01..6d0741b 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "bcache.h"
#include <algorithm>
diff --git a/gdb/block.c b/gdb/block.c
index b590697..2b6196c 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -21,7 +21,7 @@
#include "block.h"
#include "symtab.h"
#include "symfile.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "cp-support.h"
#include "addrmap.h"
#include "gdbtypes.h"
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 15c290b..5d17854 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -27,7 +27,7 @@
#include "valprint.h"
#include "cli/cli-utils.h"
#include "completer.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "mi/mi-common.h"
#include "linespec.h"
#include "probe.h"
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c
index 5d5978d..d0d9e89 100644
--- a/gdb/bsd-uthread.c
+++ b/gdb/bsd-uthread.c
@@ -29,7 +29,7 @@
#include "symfile.h"
#include "target.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "bsd-uthread.h"
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 8827ddf..1754f5f 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -19,7 +19,7 @@
#include "defs.h"
#include "buildsym-legacy.h"
#include "bfd.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index 4ca8e05..003d8a5 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -19,7 +19,7 @@
#if !defined (BUILDSYM_H)
#define BUILDSYM_H 1
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
struct objfile;
struct symbol;
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 4c9f8a7..ed7554f 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -32,7 +32,7 @@
#include "demangle.h"
#include "cp-abi.h"
#include "cp-support.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include <ctype.h>
#include "gdbcore.h"
#include "gdbarch.h"
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 71d8797..81fc82e 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "bfd.h" /* Binary File Description. */
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/charset.c b/gdb/charset.c
index 0b3ef26..9b1de08 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -20,7 +20,7 @@
#include "defs.h"
#include "charset.h"
#include "gdbcmd.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbsupport/gdb_wait.h"
#include "charset-list.h"
#include "gdbsupport/environ.h"
diff --git a/gdb/coffread.c b/gdb/coffread.c
index e264918..921cfce 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -24,7 +24,7 @@
#include "breakpoint.h"
#include "bfd.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include <ctype.h>
#include "coff/internal.h" /* Internal format of COFF symbols in BFD */
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index e617671..6130381 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -20,7 +20,7 @@
#include "defs.h"
#include "cp-support.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "symfile.h"
#include "block.h"
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index 832155b..cd473a2 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -26,7 +26,7 @@
#include "symtab.h"
#include "gdbsupport/gdb_vecs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbsupport/array-view.h"
#include <vector>
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 98ac636..1d98eb5 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
diff --git a/gdb/d-namespace.c b/gdb/d-namespace.c
index 39097e8..eab99ce 100644
--- a/gdb/d-namespace.c
+++ b/gdb/d-namespace.c
@@ -23,7 +23,7 @@
#include "language.h"
#include "namespace.h"
#include "d-lang.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbarch.h"
/* This returns the length of first component of NAME, which should be
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 849ae01..911d518 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -32,7 +32,7 @@
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include <sys/stat.h>
#include "symtab.h"
#include "breakpoint.h"
diff --git a/gdb/dictionary.c b/gdb/dictionary.c
index 7a68628..849d074 100644
--- a/gdb/dictionary.c
+++ b/gdb/dictionary.c
@@ -22,7 +22,7 @@
#include "defs.h"
#include <ctype.h>
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "buildsym.h"
#include "dictionary.h"
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index 0071c38..effeaabc 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -27,7 +27,7 @@
#include "dwarf2/index-cache.h"
#include "dwarf2/section.h"
#include "filename-seen-cache.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbsupport/hash_enum.h"
#include "gdbsupport/function-view.h"
#include "psympriv.h"
diff --git a/gdb/eval.c b/gdb/eval.c
index acac28e..713f977 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -36,7 +36,7 @@
#include "regcache.h"
#include "user-regs.h"
#include "valprint.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "objfiles.h"
#include "typeprint.h"
#include <ctype.h>
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index a633e47..0a338c1 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -21,7 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "bfd.h"
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/frame-base.c b/gdb/frame-base.c
index 7f01812..91af24b 100644
--- a/gdb/frame-base.c
+++ b/gdb/frame-base.c
@@ -20,7 +20,7 @@
#include "defs.h"
#include "frame-base.h"
#include "frame.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbarch.h"
/* A default frame base implementations. If it wasn't for the old
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index fdfe44c..302ce1e 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -24,7 +24,7 @@
#include "inline-frame.h"
#include "value.h"
#include "regcache.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "target.h"
#include "gdbarch.h"
#include "dwarf2/frame-tailcall.h"
diff --git a/gdb/frame.c b/gdb/frame.c
index cee6b08..6e2f6b2 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -24,7 +24,7 @@
#include "inferior.h" /* for inferior_ptid */
#include "regcache.h"
#include "user-regs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "dummy-frame.h"
#include "sentinel-frame.h"
#include "gdbcore.h"
diff --git a/gdb/gdb_obstack.c b/gdb/gdb_obstack.c
deleted file mode 100644
index 3f8d82a..0000000
--- a/gdb/gdb_obstack.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Obstack wrapper for GDB.
-
- Copyright (C) 2013-2022 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#include "defs.h"
-#include "gdb_obstack.h"
-
-/* Concatenate NULL terminated variable argument list of `const char *'
- strings; return the new string. Space is found in the OBSTACKP.
- Argument list must be terminated by a sentinel expression `(char *)
- NULL'. */
-
-char *
-obconcat (struct obstack *obstackp, ...)
-{
- va_list ap;
-
- va_start (ap, obstackp);
- for (;;)
- {
- const char *s = va_arg (ap, const char *);
-
- if (s == NULL)
- break;
-
- obstack_grow_str (obstackp, s);
- }
- va_end (ap);
- obstack_1grow (obstackp, 0);
-
- return (char *) obstack_finish (obstackp);
-}
diff --git a/gdb/gdb_obstack.h b/gdb/gdb_obstack.h
deleted file mode 100644
index 5e870cb..0000000
--- a/gdb/gdb_obstack.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Obstack wrapper for GDB.
-
- Copyright (C) 2002-2022 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined (GDB_OBSTACK_H)
-#define GDB_OBSTACK_H 1
-
-#include "obstack.h"
-
-/* Utility macros - wrap obstack alloc into something more robust. */
-
-template <typename T>
-static inline T*
-obstack_zalloc (struct obstack *ob)
-{
- static_assert (IsMallocable<T>::value, "Trying to use OBSTACK_ZALLOC with a \
-non-POD data type. Use obstack_new instead.");
- return ((T *) memset (obstack_alloc (ob, sizeof (T)), 0, sizeof (T)));
-}
-
-#define OBSTACK_ZALLOC(OBSTACK,TYPE) obstack_zalloc<TYPE> ((OBSTACK))
-
-template <typename T>
-static inline T *
-obstack_calloc (struct obstack *ob, size_t number)
-{
- static_assert (IsMallocable<T>::value, "Trying to use OBSTACK_CALLOC with a \
-non-POD data type. Use obstack_new instead.");
- return ((T *) memset (obstack_alloc (ob, number * sizeof (T)), 0,
- number * sizeof (T)));
-}
-
-#define OBSTACK_CALLOC(OBSTACK,NUMBER,TYPE) \
- obstack_calloc<TYPE> ((OBSTACK), (NUMBER))
-
-/* Allocate an object on OB and call its constructor. */
-
-template <typename T, typename... Args>
-static inline T*
-obstack_new (struct obstack *ob, Args&&... args)
-{
- T* object = (T *) obstack_alloc (ob, sizeof (T));
- object = new (object) T (std::forward<Args> (args)...);
- return object;
-}
-
-/* Unless explicitly specified, GDB obstacks always use xmalloc() and
- xfree(). */
-/* Note: ezannoni 2004-02-09: One could also specify the allocation
- functions using a special init function for each obstack,
- obstack_specify_allocation. However we just use obstack_init and
- let these defines here do the job. While one could argue the
- superiority of one approach over the other, we just chose one
- throughout. */
-
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free xfree
-
-#define obstack_grow_str(OBSTACK,STRING) \
- obstack_grow (OBSTACK, STRING, strlen (STRING))
-#define obstack_grow_str0(OBSTACK,STRING) \
- obstack_grow0 (OBSTACK, STRING, strlen (STRING))
-
-#define obstack_grow_wstr(OBSTACK, WSTRING) \
- obstack_grow (OBSTACK, WSTRING, sizeof (gdb_wchar_t) * gdb_wcslen (WSTRING))
-
-/* Concatenate NULL terminated variable argument list of `const char
- *' strings; return the new string. Space is found in the OBSTACKP.
- Argument list must be terminated by a sentinel expression `(char *)
- NULL'. */
-
-extern char *obconcat (struct obstack *obstackp, ...) ATTRIBUTE_SENTINEL;
-
-/* Duplicate STRING, returning an equivalent string that's allocated on the
- obstack OBSTACKP. */
-
-static inline char *
-obstack_strdup (struct obstack *obstackp, const char *string)
-{
- return (char *) obstack_copy0 (obstackp, string, strlen (string));
-}
-
-/* Duplicate STRING, returning an equivalent string that's allocated on the
- obstack OBSTACKP. */
-
-static inline char *
-obstack_strdup (struct obstack *obstackp, const std::string &string)
-{
- return (char *) obstack_copy0 (obstackp, string.c_str (),
- string.size ());
-}
-
-/* Duplicate the first N characters of STRING, returning a
- \0-terminated string that's allocated on the obstack OBSTACKP.
- Note that exactly N characters are copied, even if STRING is
- shorter. */
-
-static inline char *
-obstack_strndup (struct obstack *obstackp, const char *string, size_t n)
-{
- return (char *) obstack_copy0 (obstackp, string, n);
-}
-
-/* An obstack that frees itself on scope exit. */
-struct auto_obstack : obstack
-{
- auto_obstack ()
- { obstack_init (this); }
-
- ~auto_obstack ()
- { obstack_free (this, NULL); }
-
- DISABLE_COPY_AND_ASSIGN (auto_obstack);
-
- /* Free all memory in the obstack but leave it valid for further
- allocation. */
- void clear ()
- { obstack_free (this, obstack_base (this)); }
-};
-
-/* Objects are allocated on obstack instead of heap. */
-
-struct allocate_on_obstack
-{
- allocate_on_obstack () = default;
-
- void* operator new (size_t size, struct obstack *obstack)
- {
- return obstack_alloc (obstack, size);
- }
-
- void* operator new[] (size_t size, struct obstack *obstack)
- {
- return obstack_alloc (obstack, size);
- }
-
- void operator delete (void *memory) {}
- void operator delete[] (void *memory) {}
-};
-
-#endif
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index fc15824..6404dc1 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -24,7 +24,7 @@
#include <vector>
#include "frame.h"
#include "dis-asm.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "infrun.h"
#include "osabi.h"
#include "displaced-stepping.h"
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 42878db..467f609 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -52,7 +52,7 @@
#include "gdbsupport/underlying.h"
#include "gdbsupport/print-utils.h"
#include "dwarf2.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gmp-utils.h"
/* Forward declarations for prototypes. */
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 1586a73..e0219b1 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -69,7 +69,7 @@ extern "C"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "gdbthread.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "tid-parse.h"
#include "nat/fork-inferior.h"
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index d0c6188..74b8b21 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -32,7 +32,7 @@
*/
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "block.h"
#include "symtab.h"
#include "language.h"
diff --git a/gdb/i386-windows-tdep.c b/gdb/i386-windows-tdep.c
index d50d6ed..8e1cc17 100644
--- a/gdb/i386-windows-tdep.c
+++ b/gdb/i386-windows-tdep.c
@@ -23,7 +23,7 @@
#include "i386-tdep.h"
#include "windows-tdep.h"
#include "regset.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "xml-support.h"
#include "gdbcore.h"
#include "inferior.h"
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index b005635..4b69121 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -31,7 +31,7 @@
#include "inferior.h"
#include "cli/cli-utils.h"
#include "arch-utils.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "observable.h"
#include "objfiles.h"
#include "infcall.h"
diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c
index 9fd86f5..f929ab4 100644
--- a/gdb/m2-typeprint.c
+++ b/gdb/m2-typeprint.c
@@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "bfd.h" /* Binary File Description */
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/macroexp.c b/gdb/macroexp.c
index 97adb6e..be5723f 100644
--- a/gdb/macroexp.c
+++ b/gdb/macroexp.c
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "macrotab.h"
#include "macroexp.h"
#include "macroscope.h"
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index 479d08f..92d68e7 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "splay-tree.h"
#include "filenames.h"
#include "symtab.h"
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index b8c8ccb..1b327ad 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -45,7 +45,7 @@
#include "gdbcore.h"
#include "filenames.h"
#include "objfiles.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "buildsym-legacy.h"
#include "stabsread.h"
#include "complaints.h"
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 7be4c3c..05eac35 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -30,7 +30,7 @@
#include "language.h"
#include "location.h"
#include "linespec.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include <ctype.h>
#include "tracepoint.h"
diff --git a/gdb/namespace.h b/gdb/namespace.h
index e3bac97..dc052a4 100644
--- a/gdb/namespace.h
+++ b/gdb/namespace.h
@@ -20,7 +20,7 @@
#define NAMESPACE_H
#include "gdbsupport/gdb_vecs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
/* This struct is designed to store data from using directives. It
says that names from namespace IMPORT_SRC should be visible within
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 262009e..219dd01 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -36,7 +36,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "hashtab.h"
#include "breakpoint.h"
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 27737dc..8bd7670 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -21,7 +21,7 @@
#define OBJFILES_H
#include "hashtab.h"
-#include "gdb_obstack.h" /* For obstack internals. */
+#include "gdbsupport/gdb_obstack.h" /* For obstack internals. */
#include "objfile-flags.h"
#include "symfile.h"
#include "progspace.h"
diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c
index 468f0fd..3450836 100644
--- a/gdb/p-typeprint.c
+++ b/gdb/p-typeprint.c
@@ -19,7 +19,7 @@
/* This file is derived from p-typeprint.c */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "bfd.h" /* Binary File Description */
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index d4a3971..e0c3868 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -20,7 +20,7 @@
/* This file is derived from c-valprint.c */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
diff --git a/gdb/psymtab.h b/gdb/psymtab.h
index 7ad9a53..70eb3e2 100644
--- a/gdb/psymtab.h
+++ b/gdb/psymtab.h
@@ -20,7 +20,7 @@
#ifndef PSYMTAB_H
#define PSYMTAB_H
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "symfile.h"
#include "gdbsupport/next-iterator.h"
#include "bcache.h"
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index a884c83..4fea906 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -20,7 +20,7 @@
#include "defs.h"
#include "arch-utils.h"
#include "frame-unwind.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbcmd.h"
#include "language.h"
#include "observable.h"
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
index 2b612fb..1ad2a9c 100644
--- a/gdb/reggroups.c
+++ b/gdb/reggroups.c
@@ -26,7 +26,7 @@
#include "regcache.h"
#include "command.h"
#include "gdbcmd.h" /* For maintenanceprintlist. */
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
/* Individual register groups. */
diff --git a/gdb/rust-parse.c b/gdb/rust-parse.c
index 6628a86..a3969fe 100644
--- a/gdb/rust-parse.c
+++ b/gdb/rust-parse.c
@@ -22,7 +22,7 @@
#include "block.h"
#include "charset.h"
#include "cp-support.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdb_regex.h"
#include "rust-lang.h"
#include "parser-defs.h"
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index f6b211e..20cba38 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -26,7 +26,7 @@
#include "defs.h"
#include "bfd.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 37ce01b..a60892b 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -40,7 +40,7 @@
#include "regcache.h"
#include "filenames.h" /* for DOSish file names */
#include "gdb-stabs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "completer.h"
#include "bcache.h"
#include "hashtab.h"
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 4cbe338..3b5c3a0 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -26,7 +26,7 @@
#include "objfiles.h"
#include "breakpoint.h"
#include "command.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "language.h"
#include "bcache.h"
#include "block.h"
diff --git a/gdb/symtab.c b/gdb/symtab.c
index ba8e34d..cf9f6ce 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -47,7 +47,7 @@
#include "hashtab.h"
#include "typeprint.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "block.h"
#include "dictionary.h"
diff --git a/gdb/symtab.h b/gdb/symtab.h
index a17ee02..740c7ed 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -26,7 +26,7 @@
#include <set>
#include "gdbsupport/gdb_vecs.h"
#include "gdbtypes.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdb_regex.h"
#include "gdbsupport/enum-flags.h"
#include "gdbsupport/function-view.h"
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 282729d..7c380cd 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -30,7 +30,7 @@
#include "xml-tdesc.h"
#include "osabi.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "hashtab.h"
#include "inferior.h"
#include <algorithm>
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 2428aa2..0430df8 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "bfd.h" /* Binary File Description */
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/typeprint.h b/gdb/typeprint.h
index 97620a4..2968723 100644
--- a/gdb/typeprint.h
+++ b/gdb/typeprint.h
@@ -19,7 +19,7 @@
#ifndef TYPEPRINT_H
#define TYPEPRINT_H
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
enum language;
struct ui_file;
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index c6a4888..d30ec04 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -21,7 +21,7 @@
#include "defs.h"
#include "ui-file.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbsupport/gdb_select.h"
#include "gdbsupport/filestuff.h"
#include "cli/cli-style.h"
diff --git a/gdb/utils.c b/gdb/utils.c
index da60c1e..0be49a6 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -48,7 +48,7 @@
#include "annotate.h"
#include "filenames.h"
#include "symfile.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbcore.h"
#include "top.h"
#include "main.h"
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 0bc739c..f80c169 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -30,7 +30,7 @@
#include "target-float.h"
#include "extension.h"
#include "ada-lang.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "charset.h"
#include "typeprint.h"
#include <ctype.h>
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index bdf6ac9..81e26fe 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -48,7 +48,7 @@
#include "symfile.h"
#include "objfiles.h"
#include "gdb_bfd.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbthread.h"
#include "gdbcmd.h"
#include <unistd.h>
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index 78984d6..13be3e4 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -17,7 +17,7 @@
#include "defs.h"
#include "windows-tdep.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "xml-support.h"
#include "gdbarch.h"
#include "target.h"
diff --git a/gdb/xml-support.h b/gdb/xml-support.h
index 1be77f8..13edeae 100644
--- a/gdb/xml-support.h
+++ b/gdb/xml-support.h
@@ -21,7 +21,7 @@
#ifndef XML_SUPPORT_H
#define XML_SUPPORT_H
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "gdbsupport/xml-utils.h"
#include "gdbsupport/byte-vector.h"
#include "gdbsupport/gdb_optional.h"