public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH] Remove WITH_SIM define
Date: Fri,  4 Mar 2022 13:37:08 -0700	[thread overview]
Message-ID: <20220304203708.774277-1-tom@tromey.com> (raw)

The WITH_SIM define is used in exactly one place in gdb -- and it is
not needed there.  This patch removes it and removes the check of this
macro.

Note that re-running autoheader shows a separate change that was
missed.  I've kept it in this patch to avoid extra work.
---
 gdb/config.in    | 6 ------
 gdb/configure    | 3 ---
 gdb/configure.ac | 1 -
 gdb/score-tdep.c | 4 ----
 4 files changed, 14 deletions(-)

diff --git a/gdb/config.in b/gdb/config.in
index cd9f252eba1..a4975c68aad 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -370,9 +370,6 @@
 /* Define if sys/ptrace.h defines the PT_GETDBREGS request. */
 #undef HAVE_PT_GETDBREGS
 
-/* Define if sys/ptrace.h defines the PT_GETXMMREGS request. */
-#undef HAVE_PT_GETXMMREGS
-
 /* Define to 1 if you have the `pt_insn_event' function. */
 #undef HAVE_PT_INSN_EVENT
 
@@ -778,9 +775,6 @@
    python-config.py --exec-prefix. */
 #undef WITH_PYTHON_PATH
 
-/* Define if the simulator is being linked in. */
-#undef WITH_SIM
-
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */
 #if defined AC_APPLE_UNIVERSAL_BUILD
diff --git a/gdb/configure b/gdb/configure
index b34baff13be..a2527819a68 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -18744,9 +18744,6 @@ if test "${ignore_sim}" = "false"; then
     SIM="${gdb_sim}"
     SIM_OBS="remote-sim.o"
 
-$as_echo "#define WITH_SIM 1" >>confdefs.h
-
-
     # Some tdep code should only be compiled in when the ppc sim is
     # built.  PR sim/13418.
     case $target in
diff --git a/gdb/configure.ac b/gdb/configure.ac
index bc8925ddd69..c9c187c35ff 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2050,7 +2050,6 @@ if test "${ignore_sim}" = "false"; then
   if test x"${gdb_sim}" != x ; then
     SIM="${gdb_sim}"
     SIM_OBS="remote-sim.o"
-    AC_DEFINE(WITH_SIM, 1, [Define if the simulator is being linked in.])
 
     # Some tdep code should only be compiled in when the ppc sim is
     # built.  PR sim/13418.
diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
index e20bee46df9..b30f15f6457 100644
--- a/gdb/score-tdep.c
+++ b/gdb/score-tdep.c
@@ -103,7 +103,6 @@ score3_register_name (struct gdbarch *gdbarch, int regnum)
   return score_register_names[regnum];
 }
 
-#if WITH_SIM
 static int
 score_register_sim_regno (struct gdbarch *gdbarch, int regnum)
 {
@@ -112,7 +111,6 @@ score_register_sim_regno (struct gdbarch *gdbarch, int regnum)
 			   ? SCORE7_NUM_REGS : SCORE3_NUM_REGS));
   return regnum;
 }
-#endif
 
 static inst_t *
 score7_fetch_inst (struct gdbarch *gdbarch, CORE_ADDR addr, gdb_byte *memblock)
@@ -1461,9 +1459,7 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_float_bit (gdbarch, 32);
   set_gdbarch_double_bit (gdbarch, 64);
   set_gdbarch_long_double_bit (gdbarch, 64);
-#if WITH_SIM
   set_gdbarch_register_sim_regno (gdbarch, score_register_sim_regno);
-#endif
   set_gdbarch_pc_regnum (gdbarch, SCORE_PC_REGNUM);
   set_gdbarch_sp_regnum (gdbarch, SCORE_SP_REGNUM);
   set_gdbarch_adjust_breakpoint_address (gdbarch,
-- 
2.34.1


             reply	other threads:[~2022-03-04 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 20:37 Tom Tromey [this message]
2022-04-15 15:33 ` Tom Tromey

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=20220304203708.774277-1-tom@tromey.com \
    --to=tom@tromey.com \
    --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).