diff options
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 5 | ||||
-rw-r--r-- | sim/common/sim-trace.c | 85 | ||||
-rw-r--r-- | sim/common/sim-trace.h | 13 |
3 files changed, 5 insertions, 98 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 37f97dc..ffb7ea8 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,10 @@ 2015-06-24 Mike Frysinger <vapier@gentoo.org> + * sim-trace.c (trace_one_insn): Delete. + * sim-trace.h (trace_one_insn): Delete. + +2015-06-24 Mike Frysinger <vapier@gentoo.org> + * sim-trace.c (debug_printf): Rename to ... (sim_debug_printf): ... this. * sim-trace.h (debug_printf): Delete define. diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c index 40286e1..e69c62d 100644 --- a/sim/common/sim-trace.c +++ b/sim/common/sim-trace.c @@ -1218,91 +1218,6 @@ trace_vprintf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, va_list ap) } } -/* The function trace_one_insn has been replaced by the function pair - trace_prefix() + trace_generic(). It is still used. */ -void -trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc, - int line_p, const char *filename, int linenum, - const char *phase_wo_colon, const char *fmt, - ...) -{ - va_list ap; - char phase[SIZE_PHASE+2]; - - strncpy (phase, phase_wo_colon, SIZE_PHASE); - strcat (phase, ":"); - - if (!line_p) - { - trace_printf (sd, cpu, "%-*s %s:%-*d 0x%.*lx ", - SIZE_PHASE+1, phase, - filename, - SIZE_LINE_NUMBER, linenum, - SIZE_PC, (long)pc); - va_start (ap, fmt); - trace_vprintf (sd, cpu, fmt, ap); - va_end (ap); - trace_printf (sd, cpu, "\n"); - } - else - { - char buf[256]; - - buf[0] = 0; - if (STATE_TEXT_SECTION (CPU_STATE (cpu)) - && pc >= STATE_TEXT_START (CPU_STATE (cpu)) - && pc < STATE_TEXT_END (CPU_STATE (cpu))) - { - const char *pc_filename = (const char *)0; - const char *pc_function = (const char *)0; - unsigned int pc_linenum = 0; - - if (bfd_find_nearest_line (STATE_PROG_BFD (CPU_STATE (cpu)), - STATE_TEXT_SECTION (CPU_STATE (cpu)), - (struct bfd_symbol **) 0, - pc - STATE_TEXT_START (CPU_STATE (cpu)), - &pc_filename, &pc_function, &pc_linenum)) - { - char *p = buf; - if (pc_linenum) - { - sprintf (p, "#%-*d ", SIZE_LINE_NUMBER, pc_linenum); - p += strlen (p); - } - else - { - sprintf (p, "%-*s ", SIZE_LINE_NUMBER+1, "---"); - p += SIZE_LINE_NUMBER+2; - } - - if (pc_function) - { - sprintf (p, "%s ", pc_function); - p += strlen (p); - } - else if (pc_filename) - { - char *q = (char *) strrchr (pc_filename, '/'); - sprintf (p, "%s ", (q) ? q+1 : pc_filename); - p += strlen (p); - } - - if (*p == ' ') - *p = '\0'; - } - } - - trace_printf (sd, cpu, "%-*s 0x%.*x %-*.*s ", - SIZE_PHASE+1, phase, - SIZE_PC, (unsigned) pc, - SIZE_LOCATION, SIZE_LOCATION, buf); - va_start (ap, fmt); - trace_vprintf (sd, cpu, fmt, ap); - va_end (ap); - trace_printf (sd, cpu, "\n"); - } -} - void trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...) { diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h index 580cd4e..28fc351 100644 --- a/sim/common/sim-trace.h +++ b/sim/common/sim-trace.h @@ -618,19 +618,6 @@ do { \ } while (0) -/* The function trace_one_insn has been replaced by the function pair - trace_prefix() + trace_generic() */ -extern void trace_one_insn (SIM_DESC sd, - sim_cpu * cpu, - address_word cia, - int print_linenum_p, - const char *file_name, - int line_nr, - const char *unit, - const char *fmt, - ...) - __attribute__((format (printf, 8, 9))); - extern void trace_printf (SIM_DESC, sim_cpu *, const char *, ...) __attribute__((format (printf, 3, 4))); |