diff options
author | Michael Meissner <gnu@the-meissners.org> | 1997-05-06 11:55:21 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1997-05-06 11:55:21 +0000 |
commit | d0adfefd44ac5c813ecb75487b36f4d804a1324a (patch) | |
tree | 7ba558554ff646e50051a90122482fae17527291 /sim/igen/igen.c | |
parent | a77241718f660b81eaa8e85c9b66689101654a97 (diff) | |
download | gdb-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/igen.c')
-rw-r--r-- | sim/igen/igen.c | 13 |
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"); |