All targets are now converted to the "format_state" callback.
Signed-off-by: Daniel P. Berrangé <[email protected]>
---
hw/core/cpu-common.c | 14 +++-----------
include/hw/core/cpu.h | 2 --
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index d1ebc77d1b..494f4f41eb 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -108,17 +108,9 @@ static int cpu_common_gdb_write_register(CPUState *cpu,
uint8_t *buf, int reg)
void cpu_dump_state(CPUState *cpu, FILE *f, int flags)
{
- CPUClass *cc = CPU_GET_CLASS(cpu);
-
- if (cc->dump_state) {
- cpu_synchronize_state(cpu);
- cc->dump_state(cpu, f, flags);
- } else if (cc->format_state) {
- g_autoptr(GString) buf = g_string_new("");
- cpu_synchronize_state(cpu);
- cc->format_state(cpu, buf, flags);
- qemu_fprintf(f, "%s", buf->str);
- }
+ g_autoptr(GString) buf = g_string_new("");
+ cpu_format_state(cpu, buf, flags);
+ qemu_fprintf(f, "%s", buf->str);
}
void cpu_format_state(CPUState *cpu, GString *buf, int flags)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index a0913eedaa..9cfc7d7479 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -91,7 +91,6 @@ struct SysemuCPUOps;
* @reset_dump_flags: #CPUDumpFlags to use for reset logging.
* @has_work: Callback for checking if there is work to do.
* @memory_rw_debug: Callback for GDB memory access.
- * @dump_state: Callback for dumping state. Deprecated, use @format_state.
* @format_state: Callback for formatting state.
* @get_arch_id: Callback for getting architecture-dependent CPU ID.
* @set_pc: Callback for setting the Program Counter register. This
@@ -136,7 +135,6 @@ struct CPUClass {
bool (*has_work)(CPUState *cpu);
int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
uint8_t *buf, int len, bool is_write);
- void (*dump_state)(CPUState *cpu, FILE *, int flags);
void (*format_state)(CPUState *cpu, GString *buf, int flags);
int64_t (*get_arch_id)(CPUState *cpu);
void (*set_pc)(CPUState *cpu, vaddr value);
--
2.31.1