diff options
Diffstat (limited to 'sim/rl78/trace.c')
-rw-r--r-- | sim/rl78/trace.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sim/rl78/trace.c b/sim/rl78/trace.c index df75d79..a485c4c 100644 --- a/sim/rl78/trace.c +++ b/sim/rl78/trace.c @@ -104,6 +104,18 @@ op_printf (char *buf, char *fmt, ...) return ret; } +static int +op_styled_printf (char *buf, enum disassembler_style style, char *fmt, ...) +{ + int ret; + va_list ap; + + va_start (ap, fmt); + ret = vsprintf (opbuf + strlen (opbuf), fmt, ap); + va_end (ap); + return ret; +} + static bfd * current_bfd = NULL; static asymbol ** symtab = NULL; static int symcount = 0; @@ -205,7 +217,7 @@ sim_get_current_source_location (const char ** pfilename, initted = 1; memset (& info, 0, sizeof (info)); - INIT_DISASSEMBLE_INFO (info, stdout, op_printf); + INIT_DISASSEMBLE_INFO (info, stdout, op_printf, op_styled_printf); info.read_memory_func = sim_dis_read; info.arch = bfd_get_arch (current_bfd); info.mach = bfd_get_mach (current_bfd); |