aboutsummaryrefslogtreecommitdiff
path: root/sim/igen
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1997-05-06 11:55:21 +0000
committerMichael Meissner <gnu@the-meissners.org>1997-05-06 11:55:21 +0000
commitd0adfefd44ac5c813ecb75487b36f4d804a1324a (patch)
tree7ba558554ff646e50051a90122482fae17527291 /sim/igen
parenta77241718f660b81eaa8e85c9b66689101654a97 (diff)
downloadgdb-d0adfefd44ac5c813ecb75487b36f4d804a1324a.zip
gdb-d0adfefd44ac5c813ecb75487b36f4d804a1324a.tar.gz
gdb-d0adfefd44ac5c813ecb75487b36f4d804a1324a.tar.bz2
Fix typo; pass trace_line request as arg; pass common stuff in static struct
Diffstat (limited to 'sim/igen')
-rw-r--r--sim/igen/igen.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sim/igen/igen.c b/sim/igen/igen.c
index 68ebb66..fb9008d 100644
--- a/sim/igen/igen.c
+++ b/sim/igen/igen.c
@@ -248,15 +248,18 @@ print_itrace(lf *file,
table_entry *file_entry,
int idecode)
{
+ const char *phase = (idecode) ? "DECODE" : "INSN";
+ const char *phase_lc = (idecode) ? "decode" : "insn";
lf_printf(file, "\n");
lf_indent_suppress(file);
lf_printf(file, "#if defined(WITH_TRACE)\n");
lf_printf(file, "/* trace the instructions execution if enabled */\n");
- lf_printf(file, "if (TRACE_%s_P (CPU)) {\n", (idecode) ? "DECODE" : "INSN");
- lf_printf(file, " trace_one_insn (SD, CPU, \"%s\", %d, %d, %s, itable[MY_INDEX].name);\n",
- filter_filename(file_entry->file_name),
- file_entry->line_nr,
- idecode,
+ lf_printf(file, "if (TRACE_%s_P (CPU)) {\n", phase);
+ lf_printf(file, " static const TRACE_INSN_DATA my_insn_data = { \"%s\", &itable[MY_INDEX].file, &itable[MY_INDEX].name, %d };\n",
+ phase_lc,
+ file_entry->line_nr);
+
+ lf_printf(file, " trace_one_insn (SD, CPU, %s, TRACE_LINENUM_P (CPU), &my_insn_data);\n",
(code & generate_with_semantic_delayed_branch) ? "cia.ip" : "cia");
lf_printf(file, "}\n");