public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: move bfd.h include out of sim-main.h
@ 2022-12-23  3:37 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2022-12-23  3:37 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6cf3ddd23ec1cf33f4b9f82d267e79741a2fdc48

commit 6cf3ddd23ec1cf33f4b9f82d267e79741a2fdc48
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Thu Dec 22 22:01:19 2022 -0500

    sim: move bfd.h include out of sim-main.h
    
    Not all arches include this in sim-main.h, and the ones that do don't
    actually use bfd defines in the sim-main.h header.  Prune it to make
    sim-main.h simpler so we can kill it off entirely in the future.
    
    We add the include to the files that utilize e.g. bfd_vma though.

Diff:
---
 sim/arm/sim-main.h       | 1 -
 sim/common/cgen-trace.h  | 1 +
 sim/common/sim-base.h    | 2 ++
 sim/common/sim-trace.h   | 1 +
 sim/cr16/sim-main.h      | 1 -
 sim/cr16/simops.c        | 2 ++
 sim/d10v/sim-main.h      | 1 -
 sim/d10v/simops.c        | 2 ++
 sim/frv/sim-main.h       | 1 +
 sim/ft32/sim-main.h      | 1 -
 sim/h8300/sim-main.h     | 2 --
 sim/m68hc11/interp.c     | 2 ++
 sim/m68hc11/interrupts.c | 2 ++
 sim/m68hc11/sim-main.h   | 2 --
 sim/mcore/sim-main.h     | 1 -
 sim/mips/sim-main.h      | 1 -
 sim/moxie/sim-main.h     | 1 -
 sim/riscv/interp.c       | 2 ++
 sim/rx/gdb-if.c          | 1 +
 sim/v850/sim-main.h      | 2 --
 20 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h
index bdc5019a303..5ca01eb91c5 100644
--- a/sim/arm/sim-main.h
+++ b/sim/arm/sim-main.h
@@ -21,7 +21,6 @@
 
 #include "sim-basics.h"
 #include "sim-base.h"
-#include "bfd.h"
 
 #undef BIT
 #include "armdefs.h"
diff --git a/sim/common/cgen-trace.h b/sim/common/cgen-trace.h
index 3e2b4a9e9d7..f2368578d5e 100644
--- a/sim/common/cgen-trace.h
+++ b/sim/common/cgen-trace.h
@@ -21,6 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define CGEN_TRACE_H
 
 #include "ansidecl.h"
+#include "bfd.h"
 
 void cgen_trace_insn_init (SIM_CPU *, int);
 void cgen_trace_insn_fini (SIM_CPU *, const struct argbuf *, int);
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 796666d11d5..46bf9050ca5 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -73,6 +73,8 @@ typedef address_word sim_cia;
 typedef struct _sim_cpu SIM_CPU;
 typedef struct _sim_cpu sim_cpu;
 
+#include "bfd.h"
+
 #include "sim-module.h"
 
 #include "sim-arange.h"
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index 8d4ab130815..d7cba2df4d4 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -25,6 +25,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdarg.h>
 
 #include "ansidecl.h"
+#include "bfd.h"
 #include "dis-asm.h"
 
 /* Standard traceable entities.  */
diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h
index 188c32caa09..a54a3655981 100644
--- a/sim/cr16/sim-main.h
+++ b/sim/cr16/sim-main.h
@@ -21,7 +21,6 @@
 
 #include "sim-basics.h"
 #include "sim-base.h"
-#include "bfd.h"
 
 #include "cr16_sim.h"
 
diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c
index d58c0c93395..6eefe1bff60 100644
--- a/sim/cr16/simops.c
+++ b/sim/cr16/simops.c
@@ -31,6 +31,8 @@
 #include <time.h>
 #include <sys/time.h>
 
+#include "bfd.h"
+
 #include "sim-main.h"
 #include "sim-signal.h"
 #include "simops.h"
diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h
index a6462d8c6a4..4e6771af70f 100644
--- a/sim/d10v/sim-main.h
+++ b/sim/d10v/sim-main.h
@@ -21,7 +21,6 @@
 
 #include "sim-basics.h"
 #include "sim-base.h"
-#include "bfd.h"
 
 #include "d10v_sim.h"
 
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index 9883b3f5528..a2eb3677e7e 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -10,6 +10,8 @@
 #endif
 #include <string.h>
 
+#include "bfd.h"
+
 #include "sim-main.h"
 #include "sim-signal.h"
 #include "simops.h"
diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h
index 5fbf94d1f61..2ad75718002 100644
--- a/sim/frv/sim-main.h
+++ b/sim/frv/sim-main.h
@@ -31,6 +31,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-basics.h"
 #include "cgen-types.h"
 #include "frv-desc.h"
+#include <stdbool.h>
 #include "frv-opc.h"
 #include "arch.h"
 
diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h
index e160a12880d..5c84f9e2f21 100644
--- a/sim/ft32/sim-main.h
+++ b/sim/ft32/sim-main.h
@@ -23,7 +23,6 @@
 
 #include "sim-basics.h"
 #include "sim-base.h"
-#include "bfd.h"
 
 #include "ft32-sim.h"
 
diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
index 84bb346a9a9..c034699e5c5 100644
--- a/sim/h8300/sim-main.h
+++ b/sim/h8300/sim-main.h
@@ -1,7 +1,5 @@
 /* Main header for the Hitachi h8/300 architecture.  */
 
-#include "bfd.h"
-
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c
index 2620060dca1..89c6449dfe1 100644
--- a/sim/m68hc11/interp.c
+++ b/sim/m68hc11/interp.c
@@ -20,6 +20,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 /* This must come before any other includes.  */
 #include "defs.h"
 
+#include "bfd.h"
+
 #include "sim-main.h"
 #include "sim-assert.h"
 #include "sim-hw.h"
diff --git a/sim/m68hc11/interrupts.c b/sim/m68hc11/interrupts.c
index ee65f4375af..5b3d48faa9b 100644
--- a/sim/m68hc11/interrupts.c
+++ b/sim/m68hc11/interrupts.c
@@ -20,6 +20,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 /* This must come before any other includes.  */
 #include "defs.h"
 
+#include "bfd.h"
+
 #include "sim-main.h"
 #include "sim-options.h"
 #include "sim-signal.h"
diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index e47bd83f9b9..f320bf10b08 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -23,8 +23,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-basics.h"
 #include "sim-base.h"
 
-#include "bfd.h"
-
 #include "opcode/m68hc11.h"
 
 #include "sim/sim.h"
diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h
index 7290e02131e..684ec39354b 100644
--- a/sim/mcore/sim-main.h
+++ b/sim/mcore/sim-main.h
@@ -21,7 +21,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-basics.h"
 #include "sim-base.h"
-#include "bfd.h"
 
 /* The machine state.
    This state is maintained in host byte order.  The
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index 9ec6c121b3a..696a1bcf81b 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -25,7 +25,6 @@ mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ER
 
 #include "sim-basics.h"
 #include "sim-base.h"
-#include "bfd.h"
 #include "elf-bfd.h"
 #include "elf/mips.h"
 
diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h
index c4be80e39d2..d0df1e927cd 100644
--- a/sim/moxie/sim-main.h
+++ b/sim/moxie/sim-main.h
@@ -22,7 +22,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-basics.h"
 #include "sim-base.h"
-#include "bfd.h"
 
 #define PCIDX 17
 
diff --git a/sim/riscv/interp.c b/sim/riscv/interp.c
index 50b5a514e32..6bd0bf2a41a 100644
--- a/sim/riscv/interp.c
+++ b/sim/riscv/interp.c
@@ -21,6 +21,8 @@
 /* This must come before any other includes.  */
 #include "defs.h"
 
+#include "bfd.h"
+
 #include "sim/callback.h"
 #include "sim-main.h"
 #include "sim-options.h"
diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c
index caa7ddbcb32..edc99e6e77d 100644
--- a/sim/rx/gdb-if.c
+++ b/sim/rx/gdb-if.c
@@ -29,6 +29,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdlib.h>
 
 #include "ansidecl.h"
+#include "bfd.h"
 #include "libiberty.h"
 #include "sim/callback.h"
 #include "sim/sim.h"
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index abf2ed78feb..9d56469d666 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -11,8 +11,6 @@
 #include "sim-base.h"
 
 #include "simops.h"
-#include "bfd.h"
-
 
 typedef uint32_t reg_t;
 typedef uint64_t reg64_t;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-23  3:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23  3:37 [binutils-gdb] sim: move bfd.h include out of sim-main.h Michael Frysinger

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).