[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 26/53] target/tricore: convert to use format_state instead of
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v2 26/53] target/tricore: convert to use format_state instead of dump_state |
Date: |
Tue, 14 Sep 2021 15:20:15 +0100 |
Signed-off-by: Daniel P. Berrangé <berrange@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
- Re: [PATCH v2 20/53] target/ppc: convert to use format_state instead of dump_state, (continued)
- [PATCH v2 21/53] target/riscv: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 22/53] target/rx: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 24/53] target/sh: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 23/53] target/s390x: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 25/53] target/sparc: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 26/53] target/tricore: convert to use format_state instead of dump_state,
Daniel P . Berrangé <=
- [PATCH v2 27/53] target/xtensa: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 28/53] monitor: remove 'info ioapic' HMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 29/53] qapi: introduce x-query-registers QMP command, Daniel P . Berrangé, 2021/09/14