[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 40/53] hw/core: drop "dump_state" callback from CPU targets
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v2 40/53] hw/core: drop "dump_state" callback from CPU targets |
Date: |
Tue, 14 Sep 2021 15:20:29 +0100 |
All targets are now converted to the "format_state" callback.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
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
- [PATCH v2 32/53] qapi: introduce x-query-numa QMP command, (continued)
- [PATCH v2 32/53] qapi: introduce x-query-numa QMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 33/53] qapi: introduce x-query-usb QMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 34/53] qapi: introduce x-query-rdma QMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 35/53] qapi: introduce x-query-ramblock QMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 36/53] qapi: introduce x-query-skeys QMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 37/53] qapi: introduce x-query-cmma QMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 38/53] qapi: introduce x-query-lapic QMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 39/53] qapi: introduce x-query-irq QMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 40/53] hw/core: drop "dump_state" callback from CPU targets,
Daniel P . Berrangé <=
- [PATCH v2 41/53] hw/core: drop support for NULL pointer for FILE * in cpu_dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 42/53] hw/core: introduce a 'format_tlb' callback, Daniel P . Berrangé, 2021/09/14
[PATCH v2 43/53] target/i386: convert to use format_tlb callback, Daniel P . Berrangé, 2021/09/14
[PATCH v2 44/53] target/m68k: convert to use format_tlb callback, Daniel P . Berrangé, 2021/09/14
[PATCH v2 45/53] target/nios2: convert to use format_tlb callback, Daniel P . Berrangé, 2021/09/14