diff options
author | Wen Congyang <wency@cn.fujitsu.com> | 2012-05-07 12:07:48 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-06-04 13:49:34 -0300 |
commit | 9fecbed0c03ddad63c27f1622e2002fdfc2f45e4 (patch) | |
tree | 47c64db3c4b3932efe0ba3018f8fc38369502031 /cpu-all.h | |
parent | 2b05ab5229f880720ab6ca0e52577089889c10f9 (diff) | |
download | qemu-9fecbed0c03ddad63c27f1622e2002fdfc2f45e4.tar.gz qemu-9fecbed0c03ddad63c27f1622e2002fdfc2f45e4.tar.bz2 qemu-9fecbed0c03ddad63c27f1622e2002fdfc2f45e4.zip |
target-i386: Add API to write elf notes to core file
The core file contains register's value. These APIs write registers to
core file, and them will be called in the following patch.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'cpu-all.h')
-rw-r--r-- | cpu-all.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -541,4 +541,26 @@ static inline bool cpu_paging_enabled(CPUArchState *env) } #endif +typedef int (*write_core_dump_function)(void *buf, size_t size, void *opaque); +#if defined(CONFIG_HAVE_CORE_DUMP) +int cpu_write_elf64_note(write_core_dump_function f, CPUArchState *env, + int cpuid, void *opaque); +int cpu_write_elf32_note(write_core_dump_function f, CPUArchState *env, + int cpuid, void *opaque); +#else +static inline int cpu_write_elf64_note(write_core_dump_function f, + CPUArchState *env, int cpuid, + void *opaque) +{ + return -1; +} + +static inline int cpu_write_elf32_note(write_core_dump_function f, + CPUArchState *env, int cpuid, + void *opaque) +{ + return -1; +} +#endif + #endif /* CPU_ALL_H */ |