From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 44D6E3858401; Thu, 3 Nov 2022 15:47:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44D6E3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667490499; bh=0rmey7F6kMz66OmYijMg4sM0ImL8m4l7dyhyXOZItXE=; h=From:To:Subject:Date:From; b=XAR7rf6kZDO3yz3W7YuUN0Y3O1VNea5j9potdS5MEDRSnmP+p1e2ygpHm3T+wrktx kzWj1Qe4ujkA+sguWfvlnU5b03rff5x+Byvy2ZaNlhOlCb4rmflsixYH7crriTBXlD uWyPUMp9Fegidi10Smojt5iONt90kxt2dXXPsX+Y= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: v850: switch to standard (high-level) trace defines X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 75bed973c865be279cc0ab390372eab391b2541a X-Git-Newrev: b830591caf0db7bb416f0be3145b00db6ba1ea4c Message-Id: <20221103154819.44D6E3858401@sourceware.org> Date: Thu, 3 Nov 2022 15:47:56 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db830591caf0d= b7bb416f0be3145b00db6ba1ea4c commit b830591caf0db7bb416f0be3145b00db6ba1ea4c Author: Mike Frysinger Date: Thu Nov 3 20:58:23 2022 +0700 sim: v850: switch to standard (high-level) trace defines =20 The v850 port uses -DDEBUG to control whether to enable internal tracin= g. 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 t= he v850 build code even if it doesn't (yet) respect any other trace option= s. 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 =3D \ # Generally this consists of simulator specific files included by sim-main= .h. SIM_EXTRA_DEPS =3D v850_sim.h sim-main.h =20 -# List of flags to always pass to $(CC) -SIM_EXTRA_CFLAGS =3D \ - -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, }; =20 -#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] =3D { 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] =3D { 2, 1, 0, 27, 26, 25, 24, 31, 30, 29, 28, 23, 22, = 20, 21}; =20 -#ifdef DEBUG +#if WITH_TRACE_ANY_P #ifndef SIZE_INSTRUCTION #define SIZE_INSTRUCTION 18 #endif