public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: cgen: move symcat.h include to where it's used
Date: Fri, 23 Dec 2022 00:56:19 -0500	[thread overview]
Message-ID: <20221223055619.6307-1-vapier@gentoo.org> (raw)

Move this out of the global sim-main.h and to the few files that
actually use functions from it.  Only the cgen ports were pulling
this, so this makes cgen & non-cgen behave more the same.
---
 sim/common/cgen-mem.h  | 2 ++
 sim/common/sim-close.c | 2 ++
 sim/common/sim-core.h  | 1 +
 sim/common/sim-types.h | 2 ++
 sim/cris/sim-main.h    | 1 -
 sim/frv/sim-main.h     | 1 -
 sim/iq2000/sim-main.h  | 1 -
 sim/lm32/sim-main.h    | 1 -
 sim/m32r/m32r-sim.h    | 2 ++
 sim/m32r/sim-main.h    | 1 -
 10 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/sim/common/cgen-mem.h b/sim/common/cgen-mem.h
index 15ba8724b3b0..b266107b4c7a 100644
--- a/sim/common/cgen-mem.h
+++ b/sim/common/cgen-mem.h
@@ -20,6 +20,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef CGEN_MEM_H
 #define CGEN_MEM_H
 
+#include "symcat.h"
+
 /* TODO: This should get moved into sim-inline.h.  */
 #ifdef MEMOPS_DEFINE_INLINE
 #define MEMOPS_INLINE
diff --git a/sim/common/sim-close.c b/sim/common/sim-close.c
index 4e118a4d325e..e21e6178006d 100644
--- a/sim/common/sim-close.c
+++ b/sim/common/sim-close.c
@@ -21,6 +21,8 @@
 /* This must come before any other includes.  */
 #include "defs.h"
 
+#include "symcat.h"
+
 #include "sim-main.h"
 #include "sim-module.h"
 #include "sim/sim.h"
diff --git a/sim/common/sim-core.h b/sim/common/sim-core.h
index df4e3e17a7bc..256c552842c4 100644
--- a/sim/common/sim-core.h
+++ b/sim/common/sim-core.h
@@ -23,6 +23,7 @@
 #ifndef SIM_CORE_H
 #define SIM_CORE_H
 
+#include "symcat.h"
 
 /* core signals (error conditions)
    Define SIM_CORE_SIGNAL to catch these signals - see sim-core.c for
diff --git a/sim/common/sim-types.h b/sim/common/sim-types.h
index b4dad0d957a5..22ef343bce66 100644
--- a/sim/common/sim-types.h
+++ b/sim/common/sim-types.h
@@ -29,6 +29,8 @@
 
 #include <stdint.h>
 
+#include "symcat.h"
+
 /* INTEGER QUANTITIES:
 
    TYPES:
diff --git a/sim/cris/sim-main.h b/sim/cris/sim-main.h
index e680c37230d8..63486fc87d73 100644
--- a/sim/cris/sim-main.h
+++ b/sim/cris/sim-main.h
@@ -29,7 +29,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
    one of -scache/-pbb.  */
 #define WITH_SCACHE_PBB 1
 
-#include "symcat.h"
 #include "sim-basics.h"
 #include "cris-desc.h"
 #include "cris-opc.h"
diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h
index 44ef931270da..0d092e95579f 100644
--- a/sim/frv/sim-main.h
+++ b/sim/frv/sim-main.h
@@ -27,7 +27,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
    one of -scache/-pbb. ???? */
 #define WITH_SCACHE_PBB 0
 
-#include "symcat.h"
 #include "sim-basics.h"
 #include "frv-desc.h"
 #include <stdbool.h>
diff --git a/sim/iq2000/sim-main.h b/sim/iq2000/sim-main.h
index d920c34f98c7..2398e30b9a10 100644
--- a/sim/iq2000/sim-main.h
+++ b/sim/iq2000/sim-main.h
@@ -9,7 +9,6 @@
    one of -scache/-pbb. ???? */
 #define WITH_SCACHE_PBB 1
 
-#include "symcat.h"
 #include "sim-basics.h"
 #include "iq2000-desc.h"
 #include "iq2000-opc.h"
diff --git a/sim/lm32/sim-main.h b/sim/lm32/sim-main.h
index 829b39dd36f3..0e13aeb6758b 100644
--- a/sim/lm32/sim-main.h
+++ b/sim/lm32/sim-main.h
@@ -25,7 +25,6 @@
 
 #define WITH_SCACHE_PBB 1
 
-#include "symcat.h"
 #include "sim-basics.h"
 #include "lm32-desc.h"
 #include "lm32-opc.h"
diff --git a/sim/m32r/m32r-sim.h b/sim/m32r/m32r-sim.h
index 0c5103b0784d..fc41c2146f75 100644
--- a/sim/m32r/m32r-sim.h
+++ b/sim/m32r/m32r-sim.h
@@ -20,6 +20,8 @@
 #ifndef M32R_SIM_H
 #define M32R_SIM_H
 
+#include "symcat.h"
+
 /* GDB register numbers.  */
 #define PSW_REGNUM	16
 #define CBR_REGNUM	17
diff --git a/sim/m32r/sim-main.h b/sim/m32r/sim-main.h
index 81a6c68c01f7..a5a745d15bcf 100644
--- a/sim/m32r/sim-main.h
+++ b/sim/m32r/sim-main.h
@@ -8,7 +8,6 @@
    one of -scache/-pbb.  */
 #define WITH_SCACHE_PBB 1
 
-#include "symcat.h"
 #include "sim-basics.h"
 #include "m32r-desc.h"
 #include "m32r-opc.h"
-- 
2.39.0


                 reply	other threads:[~2022-12-23  5:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221223055619.6307-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).