Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> --- target/tricore/cpu.c | 2 +- target/tricore/cpu.h | 2 +- target/tricore/translate.c | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index b95682b7f0..11f1a79247 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -174,7 +174,7 @@ static void tricore_cpu_class_init(ObjectClass *c, void *data) cc->gdb_num_core_regs = 44; cc->gdb_arch_name = tricore_gdb_arch_name; - cc->dump_state = tricore_cpu_dump_state; + cc->format_state = tricore_cpu_format_state; cc->set_pc = tricore_cpu_set_pc; cc->sysemu_ops = &tricore_sysemu_ops; cc->tcg_ops = &tricore_tcg_ops; diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index 4b61a2c03f..572bda55e7 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -208,7 +208,7 @@ struct TriCoreCPU { hwaddr tricore_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); -void tricore_cpu_dump_state(CPUState *cpu, FILE *f, int flags); +void tricore_cpu_format_state(CPUState *cpu, GString *buf, int flags); #define MASK_PCXI_PCPN 0xff000000 diff --git a/target/tricore/translate.c b/target/tricore/translate.c index a0cc0f1cb3..a1e56fba32 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -86,7 +86,7 @@ enum { MODE_UU = 3, }; -void tricore_cpu_dump_state(CPUState *cs, FILE *f, int flags) +void tricore_cpu_format_state(CPUState *cs, GString *buf, int flags) { TriCoreCPU *cpu = TRICORE_CPU(cs); CPUTriCoreState *env = &cpu->env; @@ -95,26 +95,26 @@ void tricore_cpu_dump_state(CPUState *cs, FILE *f, int flags) psw = psw_read(env); - qemu_fprintf(f, "PC: " TARGET_FMT_lx, env->PC); - qemu_fprintf(f, " PSW: " TARGET_FMT_lx, psw); - qemu_fprintf(f, " ICR: " TARGET_FMT_lx, env->ICR); - qemu_fprintf(f, "\nPCXI: " TARGET_FMT_lx, env->PCXI); - qemu_fprintf(f, " FCX: " TARGET_FMT_lx, env->FCX); - qemu_fprintf(f, " LCX: " TARGET_FMT_lx, env->LCX); + g_string_append_printf(buf, "PC: " TARGET_FMT_lx, env->PC); + g_string_append_printf(buf, " PSW: " TARGET_FMT_lx, psw); + g_string_append_printf(buf, " ICR: " TARGET_FMT_lx, env->ICR); + g_string_append_printf(buf, "\nPCXI: " TARGET_FMT_lx, env->PCXI); + g_string_append_printf(buf, " FCX: " TARGET_FMT_lx, env->FCX); + g_string_append_printf(buf, " LCX: " TARGET_FMT_lx, env->LCX); for (i = 0; i < 16; ++i) { if ((i & 3) == 0) { - qemu_fprintf(f, "\nGPR A%02d:", i); + g_string_append_printf(buf, "\nGPR A%02d:", i); } - qemu_fprintf(f, " " TARGET_FMT_lx, env->gpr_a[i]); + g_string_append_printf(buf, " " TARGET_FMT_lx, env->gpr_a[i]); } for (i = 0; i < 16; ++i) { if ((i & 3) == 0) { - qemu_fprintf(f, "\nGPR D%02d:", i); + g_string_append_printf(buf, "\nGPR D%02d:", i); } - qemu_fprintf(f, " " TARGET_FMT_lx, env->gpr_d[i]); + g_string_append_printf(buf, " " TARGET_FMT_lx, env->gpr_d[i]); } - qemu_fprintf(f, "\n"); + g_string_append_printf(buf, "\n"); } /* -- 2.31.1