Wen Congyang | 25ae9c1 | 2012-05-07 12:08:56 +0800 | [diff] [blame] | 1 | /* |
| 2 | * QEMU dump |
| 3 | * |
| 4 | * Copyright Fujitsu, Corp. 2011, 2012 |
| 5 | * |
| 6 | * Authors: |
| 7 | * Wen Congyang <wency@cn.fujitsu.com> |
| 8 | * |
Stefan Weil | 352666e | 2012-06-10 19:34:04 +0000 | [diff] [blame] | 9 | * This work is licensed under the terms of the GNU GPL, version 2 or later. |
| 10 | * See the COPYING file in the top-level directory. |
Wen Congyang | 25ae9c1 | 2012-05-07 12:08:56 +0800 | [diff] [blame] | 11 | * |
| 12 | */ |
| 13 | |
| 14 | #ifndef DUMP_H |
| 15 | #define DUMP_H |
| 16 | |
| 17 | typedef struct ArchDumpInfo { |
| 18 | int d_machine; /* Architecture */ |
| 19 | int d_endian; /* ELFDATA2LSB or ELFDATA2MSB */ |
| 20 | int d_class; /* ELFCLASS32 or ELFCLASS64 */ |
| 21 | } ArchDumpInfo; |
| 22 | |
Paolo Bonzini | 5f86146 | 2012-06-07 08:22:56 +0200 | [diff] [blame] | 23 | typedef int (*write_core_dump_function)(void *buf, size_t size, void *opaque); |
| 24 | int cpu_write_elf64_note(write_core_dump_function f, CPUArchState *env, |
| 25 | int cpuid, void *opaque); |
| 26 | int cpu_write_elf32_note(write_core_dump_function f, CPUArchState *env, |
| 27 | int cpuid, void *opaque); |
| 28 | int cpu_write_elf64_qemunote(write_core_dump_function f, CPUArchState *env, |
| 29 | void *opaque); |
| 30 | int cpu_write_elf32_qemunote(write_core_dump_function f, CPUArchState *env, |
| 31 | void *opaque); |
| 32 | int cpu_get_dump_info(ArchDumpInfo *info); |
| 33 | ssize_t cpu_get_note_size(int class, int machine, int nr_cpus); |
| 34 | |
Wen Congyang | 25ae9c1 | 2012-05-07 12:08:56 +0800 | [diff] [blame] | 35 | #endif |