Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> --- target/rx/cpu.c | 2 +- target/rx/cpu.h | 2 +- target/rx/translate.c | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 96cc96e514..f7f158cfa5 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -207,7 +207,7 @@ static void rx_cpu_class_init(ObjectClass *klass, void *data) cc->class_by_name = rx_cpu_class_by_name; cc->has_work = rx_cpu_has_work; - cc->dump_state = rx_cpu_dump_state; + cc->format_state = rx_cpu_format_state; cc->set_pc = rx_cpu_set_pc; #ifndef CONFIG_USER_ONLY diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 0b4b998c7b..97fc1b9ed6 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -126,7 +126,7 @@ typedef RXCPU ArchCPU; const char *rx_crname(uint8_t cr); void rx_cpu_do_interrupt(CPUState *cpu); bool rx_cpu_exec_interrupt(CPUState *cpu, int int_req); -void rx_cpu_dump_state(CPUState *cpu, FILE *f, int flags); +void rx_cpu_format_state(CPUState *cpu, GString *buf, int flags); int rx_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int rx_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); hwaddr rx_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); diff --git a/target/rx/translate.c b/target/rx/translate.c index a3cf720455..2d3bdabce4 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -125,7 +125,7 @@ static int bdsp_s(DisasContext *ctx, int d) /* Include the auto-generated decoder. */ #include "decode-insns.c.inc" -void rx_cpu_dump_state(CPUState *cs, FILE *f, int flags) +void rx_cpu_format_state(CPUState *cs, GString *buf, int flags) { RXCPU *cpu = RX_CPU(cs); CPURXState *env = &cpu->env; @@ -133,12 +133,14 @@ void rx_cpu_dump_state(CPUState *cs, FILE *f, int flags) uint32_t psw; psw = rx_cpu_pack_psw(env); - qemu_fprintf(f, "pc=0x%08x psw=0x%08x\n", - env->pc, psw); + g_string_append_printf(buf, "pc=0x%08x psw=0x%08x\n", + env->pc, psw); for (i = 0; i < 16; i += 4) { - qemu_fprintf(f, "r%d=0x%08x r%d=0x%08x r%d=0x%08x r%d=0x%08x\n", - i, env->regs[i], i + 1, env->regs[i + 1], - i + 2, env->regs[i + 2], i + 3, env->regs[i + 3]); + g_string_append_printf(buf, + "r%d=0x%08x r%d=0x%08x r%d=0x%08x r%d=0x%08x\n", + i, env->regs[i], i + 1, env->regs[i + 1], + i + 2, env->regs[i + 2], i + 3, + env->regs[i + 3]); } } -- 2.31.1