Include objfiles.h in a few .c files
authorTom Tromey <tom@tromey.com>
Sun, 8 Aug 2021 14:53:17 +0000 (08:53 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 8 Aug 2021 14:53:17 +0000 (08:53 -0600)
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
gdb/dwarf2/expr.c
gdb/dwarf2/macro.c

index ef819799eb49b6d650cd19b57d00b193bfecc083..fb1a4ff02b6f45cc6a59d8549357d41e1212e1e6 100644 (file)
@@ -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"
index 9e5a3566d61cb057fe441f3ac9dace47559d078c..cc1a72d7cd1222e5200e82c3f052e3edd0a892d7 100644 (file)
@@ -32,6 +32,7 @@
 #include "frame.h"
 #include "gdbsupport/underlying.h"
 #include "gdbarch.h"
+#include "objfiles.h"
 
 /* Cookie for gdbarch data.  */
 
index 082c4e9672ae872b202efc4e9f9e2c66278712e5..86f7bd79cb2077a54c49b42a9f3b30015d0315a5 100644 (file)
@@ -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)