public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Remove WITH_SIM define
@ 2022-03-04 20:37 Tom Tromey
  2022-04-15 15:33 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2022-03-04 20:37 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remove WITH_SIM define
  2022-03-04 20:37 [PATCH] Remove WITH_SIM define Tom Tromey
@ 2022-04-15 15:33 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2022-04-15 15:33 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

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

Tom> Note that re-running autoheader shows a separate change that was
Tom> missed.  I've kept it in this patch to avoid extra work.

I'm checking this in.  However, since I submitted this patch,
score-tdep.c has been removed -- removing the last use of WITH_SIM.
I've updated the commit message accordingly.

Tom

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-15 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 20:37 [PATCH] Remove WITH_SIM define Tom Tromey
2022-04-15 15:33 ` Tom Tromey

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