From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 40EAB3858D1E for ; Fri, 23 Dec 2022 03:37:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 40EAB3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id BD44234113D; Fri, 23 Dec 2022 03:37:04 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 1/2] sim: move bfd.h include out of sim-main.h Date: Thu, 22 Dec 2022 22:37:00 -0500 Message-Id: <20221223033701.2884-1-vapier@gentoo.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. --- 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 bdc5019a3033..5ca01eb91c5f 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 3e2b4a9e9d7e..f2368578d5ea 100644 --- a/sim/common/cgen-trace.h +++ b/sim/common/cgen-trace.h @@ -21,6 +21,7 @@ along with this program. If not, see . */ #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 796666d11d5e..46bf9050ca56 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 8d4ab1308153..d7cba2df4d4c 100644 --- a/sim/common/sim-trace.h +++ b/sim/common/sim-trace.h @@ -25,6 +25,7 @@ along with this program. If not, see . */ #include #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 188c32caa09c..a54a36559814 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 d58c0c933953..6eefe1bff60f 100644 --- a/sim/cr16/simops.c +++ b/sim/cr16/simops.c @@ -31,6 +31,8 @@ #include #include +#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 a6462d8c6a43..4e6771af70fc 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 9883b3f55281..a2eb3677e7e2 100644 --- a/sim/d10v/simops.c +++ b/sim/d10v/simops.c @@ -10,6 +10,8 @@ #endif #include +#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 5fbf94d1f613..2ad757180021 100644 --- a/sim/frv/sim-main.h +++ b/sim/frv/sim-main.h @@ -31,6 +31,7 @@ along with this program. If not, see . */ #include "sim-basics.h" #include "cgen-types.h" #include "frv-desc.h" +#include #include "frv-opc.h" #include "arch.h" diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h index e160a12880dd..5c84f9e2f219 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 84bb346a9a95..c034699e5c55 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 2620060dca1d..89c6449dfe1a 100644 --- a/sim/m68hc11/interp.c +++ b/sim/m68hc11/interp.c @@ -20,6 +20,8 @@ along with this program. If not, see . */ /* 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 ee65f4375af1..5b3d48faa9b4 100644 --- a/sim/m68hc11/interrupts.c +++ b/sim/m68hc11/interrupts.c @@ -20,6 +20,8 @@ along with this program. If not, see . */ /* 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 e47bd83f9b9a..f320bf10b08c 100644 --- a/sim/m68hc11/sim-main.h +++ b/sim/m68hc11/sim-main.h @@ -23,8 +23,6 @@ along with this program. If not, see . */ #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 7290e02131ec..684ec39354be 100644 --- a/sim/mcore/sim-main.h +++ b/sim/mcore/sim-main.h @@ -21,7 +21,6 @@ along with this program. If not, see . */ #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 9ec6c121b3aa..696a1bcf81bd 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 c4be80e39d26..d0df1e927cd1 100644 --- a/sim/moxie/sim-main.h +++ b/sim/moxie/sim-main.h @@ -22,7 +22,6 @@ along with this program. If not, see . */ #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 50b5a514e327..6bd0bf2a41a6 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 caa7ddbcb325..edc99e6e77d0 100644 --- a/sim/rx/gdb-if.c +++ b/sim/rx/gdb-if.c @@ -29,6 +29,7 @@ along with this program. If not, see . */ #include #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 abf2ed78febc..9d56469d6665 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; -- 2.39.0