sim: trace: drop unused trace_one_insn
Everyone has migrated to the split functions (trace_prefix + trace_generic) a while ago, so we can drop this one now.
This commit is contained in:
parent
9b6025d169
commit
602a67cbea
|
@ -1,3 +1,8 @@
|
|||
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 ...
|
||||
|
|
|
@ -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, ...)
|
||||
{
|
||||
|
|
|
@ -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)));
|
||||
|
||||
|
|
Loading…
Reference in New Issue