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 5/7 v2] sim: unify debug/stdio/trace/profile build settings
Date: Sat, 12 Jun 2021 20:09:26 -0400	[thread overview]
Message-ID: <20210613000926.26447-1-vapier@gentoo.org> (raw)
In-Reply-To: <20210607053355.9965-5-vapier@gentoo.org>

Move these options up to the common dir so we only test & export
them once across all ports.

The ppc code needs a little extra care with its trace settings as
it's not exactly the same API as the common code.  The other knobs
are the same though.
---
 sim/ChangeLog                 |   8 ++
 sim/Makefile.in               |   4 +
 sim/aarch64/config.in         |  18 -----
 sim/aarch64/configure         | 134 +---------------------------------
 sim/aclocal.m4                |   4 +
 sim/arm/config.in             |  18 -----
 sim/arm/configure             | 134 +---------------------------------
 sim/avr/config.in             |  18 -----
 sim/avr/configure             | 134 +---------------------------------
 sim/bfin/config.in            |  18 -----
 sim/bfin/configure            | 134 +---------------------------------
 sim/bpf/config.in             |  18 -----
 sim/bpf/configure             | 134 +---------------------------------
 sim/config.h.in               |  18 +++++
 sim/configure                 | 123 +++++++++++++++++++++++++++++++
 sim/configure.ac              |   6 ++
 sim/cr16/config.in            |  18 -----
 sim/cr16/configure            | 134 +---------------------------------
 sim/cris/config.in            |  18 -----
 sim/cris/configure            | 134 +---------------------------------
 sim/d10v/config.in            |  18 -----
 sim/d10v/configure            | 134 +---------------------------------
 sim/erc32/config.in           |  18 -----
 sim/erc32/configure           | 134 +---------------------------------
 sim/example-synacor/config.in |  18 -----
 sim/example-synacor/configure | 134 +---------------------------------
 sim/frv/config.in             |  18 -----
 sim/frv/configure             | 134 +---------------------------------
 sim/ft32/config.in            |  18 -----
 sim/ft32/configure            | 134 +---------------------------------
 sim/h8300/config.in           |  18 -----
 sim/h8300/configure           | 134 +---------------------------------
 sim/iq2000/config.in          |  18 -----
 sim/iq2000/configure          | 134 +---------------------------------
 sim/lm32/config.in            |  18 -----
 sim/lm32/configure            | 134 +---------------------------------
 sim/m32c/config.in            |  18 -----
 sim/m32c/configure            | 134 +---------------------------------
 sim/m32r/config.in            |  18 -----
 sim/m32r/configure            | 134 +---------------------------------
 sim/m4/sim_ac_common.m4       |  16 ----
 sim/m68hc11/config.in         |  18 -----
 sim/m68hc11/configure         | 134 +---------------------------------
 sim/mcore/config.in           |  18 -----
 sim/mcore/configure           | 134 +---------------------------------
 sim/microblaze/config.in      |  18 -----
 sim/microblaze/configure      | 134 +---------------------------------
 sim/mips/config.in            |  18 -----
 sim/mips/configure            | 134 +---------------------------------
 sim/mn10300/config.in         |  18 -----
 sim/mn10300/configure         | 134 +---------------------------------
 sim/moxie/config.in           |  18 -----
 sim/moxie/configure           | 134 +---------------------------------
 sim/msp430/config.in          |  18 -----
 sim/msp430/configure          | 134 +---------------------------------
 sim/or1k/config.in            |  18 -----
 sim/or1k/configure            | 134 +---------------------------------
 sim/ppc/config.in             |   6 --
 sim/ppc/configure             |  44 -----------
 sim/ppc/configure.ac          |  26 -------
 sim/ppc/debug.h               |  19 +++++
 sim/pru/config.in             |  18 -----
 sim/pru/configure             | 134 +---------------------------------
 sim/riscv/config.in           |  18 -----
 sim/riscv/configure           | 134 +---------------------------------
 sim/rl78/config.in            |  18 -----
 sim/rl78/configure            | 134 +---------------------------------
 sim/rx/config.in              |  18 -----
 sim/rx/configure              | 134 +---------------------------------
 sim/sh/config.in              |  18 -----
 sim/sh/configure              | 134 +---------------------------------
 sim/v850/config.in            |  18 -----
 sim/v850/configure            | 134 +---------------------------------
 73 files changed, 244 insertions(+), 4742 deletions(-)

diff --git a/sim/configure.ac b/sim/configure.ac
index ecf12b57a19b..d8c6f2d4feb4 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -99,8 +99,14 @@ if test "${enable_sim}" != no; then
 fi
 AM_CONDITIONAL([SIM_ENABLE_IGEN], [test "$sim_igen" = "yes"])
 
+dnl Standard (and optional) simulator options.
+dnl Eventually all simulators will support these.
 SIM_AC_OPTION_ASSERT
+SIM_AC_OPTION_DEBUG
 SIM_AC_OPTION_ENVIRONMENT
+SIM_AC_OPTION_PROFILE
+SIM_AC_OPTION_STDIO
+SIM_AC_OPTION_TRACE
 
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index 353855707ad7..0f687dc7bc58 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -54,26 +54,10 @@ AM_CONDITIONAL(PLUGINS, test "$plugins" = yes)
 LT_INIT([dlopen])
 AC_SUBST(lt_cv_dlopen_libs)
 
-dnl Standard (and optional) simulator options.
-dnl Eventually all simulators will support these.
-dnl Do not add any here that cannot be supported by all simulators.
-dnl Do not add similar but different options to a particular simulator,
-dnl all shall eventually behave the same way.
-
-
 dnl We don't use automake, but we still want to support
 dnl --enable-maintainer-mode.
 AM_MAINTAINER_MODE
 
-
-SIM_AC_OPTION_DEBUG
-
-SIM_AC_OPTION_STDIO
-
-SIM_AC_OPTION_TRACE
-
-SIM_AC_OPTION_PROFILE
-
 SIM_AC_OPTION_INLINE
 
 ACX_PKGVERSION([SIM])
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index bf17622434e4..9783dcf40734 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -519,19 +519,6 @@ if test x"$silent" != x"yes"; then
 fi])dnl
 
 
-AC_MSG_CHECKING([for sim stdio debug behavior])
-sim_stdio=0
-AC_ARG_ENABLE(sim-stdio,
-[  --enable-sim-stdio			Specify whether to use stdio for console input/output.],
-[case "${enableval}" in
-  yes)	sim_stdio="DO_USE_STDIO";;
-  no)	sim_stdio="DONT_USE_STDIO";;
-  *)	AC_MSG_ERROR([Unknown value $enableval passed to --enable-sim-stdio]);;
-esac])dnl
-AC_DEFINE_UNQUOTED([WITH_STDIO], [$sim_stdio], [How to route I/O])
-AC_MSG_RESULT($sim_stdio)
-
-
 AC_ARG_ENABLE(sim-switch,
 [  --enable-sim-switch			Use a switch instead of a table for instruction call.],
 [case "${enableval}" in
@@ -559,19 +546,6 @@ if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then
 fi],[sim_timebase=""])dnl
 
 
-AC_MSG_CHECKING([for sim trace settings])
-sim_trace="1"
-AC_ARG_ENABLE(sim-trace,
-[  --enable-sim-trace			Specify whether tracing is supported.],
-[case "${enableval}" in
-  yes)	sim_trace="1";;
-  no)	sim_trace="0";;
-  *)	AC_MSG_ERROR([--enable-sim-trace does not take a value]);;
-esac])dnl
-AC_DEFINE_UNQUOTED([WITH_TRACE], [$sim_trace], [Sim trace settings])
-AC_MSG_RESULT($sim_trace)
-
-
 AC_ARG_ENABLE(werror,
   AS_HELP_STRING([--enable-werror], [treat compile warnings as errors]),
   [case "${enableval}" in
diff --git a/sim/ppc/debug.h b/sim/ppc/debug.h
index 6f19624179e2..08ea5795fd89 100644
--- a/sim/ppc/debug.h
+++ b/sim/ppc/debug.h
@@ -169,5 +169,24 @@ trace_option(const char *option, int setting);
 extern void trace_usage
 (int verbose);
 
+/* TODO: These values aren't currently used by the ppc port.  They're here to
+   glue the common sim compile-time settings in.  The ppc_trace settings above
+   would need to be overhauled.  */
+#define TRACE_insn     1
+#define TRACE_disasm   1
+#define TRACE_decode   1
+#define TRACE_extract  1
+#define TRACE_linenum  1
+#define TRACE_memory   1
+#define TRACE_model    1
+#define TRACE_alu      1
+#define TRACE_core     1
+#define TRACE_events   1
+#define TRACE_fpu      1
+#define TRACE_vpu      1
+#define TRACE_branch   1
+#define TRACE_syscall  1
+#define TRACE_register 1
+#define TRACE_debug    1
 
 #endif /* _DEBUG_H_ */
-- 
2.31.1


  reply	other threads:[~2021-06-13  0:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  5:33 [PATCH 1/7] sim: unify platform function & header tests Mike Frysinger
2021-06-07  5:33 ` [PATCH 2/7] sim: unify assert build settings Mike Frysinger
2021-06-07  5:33 ` [PATCH 3/7] sim: unify environment " Mike Frysinger
2021-06-12 17:17   ` [PATCH/committed] sim: ppc: unify env settings too Mike Frysinger
2021-06-07  5:33 ` [PATCH 4/7] sim: split debug/stdio/trace/profile options into dedicated m4 files Mike Frysinger
2021-06-07  5:33 ` [PATCH 5/7] sim: unify debug/stdio/trace/profile build settings Mike Frysinger
2021-06-13  0:09   ` Mike Frysinger [this message]
2021-06-07  5:33 ` [PATCH 6/7] sim: unify bug & package settings Mike Frysinger
2021-06-13  0:25   ` [PATCH 6/7 v2] " Mike Frysinger
2021-06-07  5:33 ` [PATCH 7/7] sim: overhaul alignment settings management Mike Frysinger
2021-06-13  1:19   ` [PATCH 7/7 v2] " Mike Frysinger
2021-06-12 18:40 ` [PATCH/committed] sim: ppc: unify header & function & type tests too Mike Frysinger

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