public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Frysinger <vapier@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] sim: v850: switch to standard (high-level) trace defines
Date: Thu,  3 Nov 2022 15:47:56 +0000 (GMT)	[thread overview]
Message-ID: <20221103154819.44D6E3858401@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b830591caf0db7bb416f0be3145b00db6ba1ea4c

commit b830591caf0db7bb416f0be3145b00db6ba1ea4c
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Thu Nov 3 20:58:23 2022 +0700

    sim: v850: switch to standard (high-level) trace defines
    
    The v850 port uses -DDEBUG to control whether to enable internal tracing.
    We already have such options via the common trace framework, and those
    can be controlled at build time via configure flags (which the v850 code
    currently cannot).  So switch it over to WITH_TRACE_ANY_P to simplify the
    v850 build code even if it doesn't (yet) respect any other trace options.

Diff:
---
 sim/v850/Makefile.in | 4 ----
 sim/v850/sim-main.h  | 2 +-
 sim/v850/simops.c    | 2 +-
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/sim/v850/Makefile.in b/sim/v850/Makefile.in
index 4c2d278d0a5..ab4214526a4 100644
--- a/sim/v850/Makefile.in
+++ b/sim/v850/Makefile.in
@@ -27,8 +27,4 @@ SIM_OBJS = \
 # Generally this consists of simulator specific files included by sim-main.h.
 SIM_EXTRA_DEPS = v850_sim.h sim-main.h
 
-# List of flags to always pass to $(CC)
-SIM_EXTRA_CFLAGS = \
-	-DDEBUG
-
 ## COMMON_POST_CONFIG_FRAG
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index 49b845dfe7a..ab7e47aa240 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -435,7 +435,7 @@ enum op_types
   OP_PUSHPOP3,
 };
 
-#ifdef DEBUG
+#if WITH_TRACE_ANY_P
 void trace_input (char *name, enum op_types type, int size);
 void trace_output (enum op_types result);
 void trace_result (int has_result, uint32_t result);
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index 573ece54ec7..1d5403be561 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -39,7 +39,7 @@ int type2_regs[16] = { 3, 2, 1, 0, 27, 26, 25, 24, 31, 30, 29, 28, 23, 22, 20, 2
    that order in a push/pop instruction.  */
 int type3_regs[15] = { 2, 1, 0, 27, 26, 25, 24, 31, 30, 29, 28, 23, 22, 20, 21};
 
-#ifdef DEBUG
+#if WITH_TRACE_ANY_P
 #ifndef SIZE_INSTRUCTION
 #define SIZE_INSTRUCTION 18
 #endif

                 reply	other threads:[~2022-11-03 15:47 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=20221103154819.44D6E3858401@sourceware.org \
    --to=vapier@sourceware.org \
    --cc=gdb-cvs@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).