target-i386: Add API to write cpu status to core file
PATCH v10 8/11 target-i386: Add API to write cpu status to core file
The core file has register's value. But it does not include all registers value. Store the cpu status into QEMU note, and the user can get more information from vmcore. If you change QEMUCPUState, please count up QEMUCPUSTATE_VERSION.
Signed-off-by Wen Congyang <[email protected]>
--- cpu-all.h | 20 ++++++ target-i386/arch_dump.c | 150 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 0 deletions(-)
cpu-all.h +20 -0
@@ -549,6 +549,10 @@ int cpu_write_elf64_note(write_core_dump_function f, CPUArchState *env, int cpuid, target_phys_addr_t *offset, void *opaque);int cpu_write_elf32_note (write_core_dump_function f,CPUArchState *env,int cpuid,target_phys_addr_t *offset,void *opaque); +int cpu_write_elf64_qemunote (write_core_dump_function f,CPUArchState *env, +target_phys_addr_t *offset,void *opaque); +int cpu_write_elf32_qemunote (write_core_dump_function f,CPUArchState *env, +target_phys_addr_t *offset,void *opaque);#else static inline int cpu_write_elf64_note(write_core_dump_function f, CPUArchState *env, int cpuid,
@@ -563,6 +567,22 @@ static inline int cpu_write_elf32_note(write_core_dump_function f, {return -1 ; } + +static inline int cpu_write_elf64_qemunote (write_core_dump_function f, +CPUArchState *env, +target_phys_addr_t *offset, +void *opaque); +{ +return -1 ; +} + +static inline int cpu_write_elf32_qemunote (write_core_dump_function f, +CPUArchState *env, +target_phys_addr_t *offset, +void *opaque) +{ +return -1 ; +}#endif #endif /* CPU_ALL_H */
target-i386/arch_dump.c +150 -0
153 lines not on this page · raw message
Signature · 1 line
1.7.1