summaryrefslogtreecommitdiffstats
path: root/cpu-all.h
diff options
context:
space:
mode:
authorWen Congyang <wency@cn.fujitsu.com>2012-05-07 12:07:48 +0800
committerLuiz Capitulino <lcapitulino@redhat.com>2012-06-04 13:49:34 -0300
commit9fecbed0c03ddad63c27f1622e2002fdfc2f45e4 (patch)
tree47c64db3c4b3932efe0ba3018f8fc38369502031 /cpu-all.h
parent2b05ab5229f880720ab6ca0e52577089889c10f9 (diff)
downloadhqemu-9fecbed0c03ddad63c27f1622e2002fdfc2f45e4.zip
hqemu-9fecbed0c03ddad63c27f1622e2002fdfc2f45e4.tar.gz
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.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/cpu-all.h b/cpu-all.h
index 76439b4..a71e887 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -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 */
OpenPOWER on IntegriCloud