* [pushed] Include objfiles.h in a few .c files
@ 2021-08-08 14:55 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2021-08-08 14:55 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
I found a few .c files that rely on objfiles.h, but that only include
it indirectly, via dwarf2/read.h -> psympriv.h. If that include is
removed (something my new DWARF indexer series does), then the build
will break.
It seemed harmless and correct to add these includes now, making the
eventual series a little smaller.
---
gdb/compile/compile-loc2c.c | 1 +
gdb/dwarf2/expr.c | 1 +
gdb/dwarf2/macro.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c
index ef819799eb4..fb1a4ff02b6 100644
--- a/gdb/compile/compile-loc2c.c
+++ b/gdb/compile/compile-loc2c.c
@@ -19,6 +19,7 @@
#include "defs.h"
#include "dwarf2.h"
+#include "objfiles.h"
#include "dwarf2/expr.h"
#include "dwarf2/loc.h"
#include "dwarf2/read.h"
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c
index 9e5a3566d61..cc1a72d7cd1 100644
--- a/gdb/dwarf2/expr.c
+++ b/gdb/dwarf2/expr.c
@@ -32,6 +32,7 @@
#include "frame.h"
#include "gdbsupport/underlying.h"
#include "gdbarch.h"
+#include "objfiles.h"
/* Cookie for gdbarch data. */
diff --git a/gdb/dwarf2/macro.c b/gdb/dwarf2/macro.c
index 082c4e9672a..86f7bd79cb2 100644
--- a/gdb/dwarf2/macro.c
+++ b/gdb/dwarf2/macro.c
@@ -35,6 +35,7 @@
#include "buildsym.h"
#include "macrotab.h"
#include "complaints.h"
+#include "objfiles.h"
static void
dwarf2_macro_malformed_definition_complaint (const char *arg1)
--
2.31.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-08 14:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-08 14:55 [pushed] Include objfiles.h in a few .c files Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).