diff options
author | Frank Ch. Eigler <fche@redhat.com> | 1998-12-30 18:30:48 +0000 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 1998-12-30 18:30:48 +0000 |
commit | 86df8e79fc5b70948fd5041c902c7934b2311476 (patch) | |
tree | 416eb9586cb44d301a821273d58eaa7932407b88 /sim | |
parent | 32ac892aab92fd45d4a7df6139638bc5c6e2f1d4 (diff) | |
download | gdb-86df8e79fc5b70948fd5041c902c7934b2311476.zip gdb-86df8e79fc5b70948fd5041c902c7934b2311476.tar.gz gdb-86df8e79fc5b70948fd5041c902c7934b2311476.tar.bz2 |
* build / debug improvements for gx JIT sim prototype
Diffstat (limited to 'sim')
-rw-r--r-- | sim/m32r-gx/ChangeLog | 8 | ||||
-rw-r--r-- | sim/m32r-gx/cpuall.h | 2 | ||||
-rw-r--r-- | sim/m32r-gx/gx-translate.c | 12 | ||||
-rw-r--r-- | sim/m32r-gx/sim-main.h | 4 |
4 files changed, 23 insertions, 3 deletions
diff --git a/sim/m32r-gx/ChangeLog b/sim/m32r-gx/ChangeLog index a04bd6f..7c9fec0 100644 --- a/sim/m32r-gx/ChangeLog +++ b/sim/m32r-gx/ChangeLog @@ -1,3 +1,11 @@ +1998-12-30 Frank Ch. Eigler <fche@elastic.org> + + * cpuall.h: Don't include sim-model.h. + * gx-translate.c (m32r_emit_short_insn): Emit a PC trace on stdout + if $GX_TRACE is set. + (m32r_emit_long_insn): Ditto. + * sim-main.h: #undef some newly imported macros from cgen headers. + 1998-12-05 Frank Ch. Eigler <fche@elastic.org> * gx-translate.c (m32r_emit_short_insn): Correct ABI result diff --git a/sim/m32r-gx/cpuall.h b/sim/m32r-gx/cpuall.h index 11213e3..f159213 100644 --- a/sim/m32r-gx/cpuall.h +++ b/sim/m32r-gx/cpuall.h @@ -1,2 +1,2 @@ #include "sim-cpu.h" -#include "sim-model.h" +/* #include "sim-model.h" */ diff --git a/sim/m32r-gx/gx-translate.c b/sim/m32r-gx/gx-translate.c index aa0a0f1..b3db866 100644 --- a/sim/m32r-gx/gx-translate.c +++ b/sim/m32r-gx/gx-translate.c @@ -435,7 +435,11 @@ m32r_emit_long_insn(sim_gx_block* gx, PCADDR pc, unsigned insn, int optimized) ASSERT(f != NULL); - /* fprintf(f, " printf(\"0x%06x\\n\");\n", pc); */ + /* force PC trace by environment variable */ +#ifdef HAVE_GETENV + if(getenv("GX_TRACE")) + fprintf(f, " printf(\"0x%06x\\n\");\n", pc); +#endif if(op1 == 0x8 && op2 == 0x4 && r1 == 0) { @@ -836,7 +840,11 @@ m32r_emit_short_insn(sim_gx_block* gx, PCADDR pc, unsigned insn, int optimized) ASSERT(f != NULL); - /* fprintf(f, " printf(\"0x%06x\\n\");\n", pc); */ + /* force PC trace by environment variable */ +#ifdef HAVE_GETENV + if(getenv("GX_TRACE")) + fprintf(f, " printf(\"0x%06x\\n\");\n", pc); +#endif if(0) ; /* place holder */ diff --git a/sim/m32r-gx/sim-main.h b/sim/m32r-gx/sim-main.h index 3367dcb..6238922 100644 --- a/sim/m32r-gx/sim-main.h +++ b/sim/m32r-gx/sim-main.h @@ -14,7 +14,11 @@ typedef struct _sim_cpu SIM_CPU; #include "ansidecl.h" #include "symcat.h" + #include "cgen-types.h" +#undef SIM_HAVE_MODEL +#undef SIM_HAVE_ADDR_RANGE + #include "arch.h" #include "sim-basics.h" |