dump.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * QEMU dump
  3. *
  4. * Copyright Fujitsu, Corp. 2011, 2012
  5. *
  6. * Authors:
  7. * Wen Congyang <wency@cn.fujitsu.com>
  8. *
  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.
  11. *
  12. */
  13. #ifndef DUMP_H
  14. #define DUMP_H
  15. typedef struct ArchDumpInfo {
  16. int d_machine; /* Architecture */
  17. int d_endian; /* ELFDATA2LSB or ELFDATA2MSB */
  18. int d_class; /* ELFCLASS32 or ELFCLASS64 */
  19. } ArchDumpInfo;
  20. typedef int (*write_core_dump_function)(void *buf, size_t size, void *opaque);
  21. int cpu_write_elf64_note(write_core_dump_function f, CPUArchState *env,
  22. int cpuid, void *opaque);
  23. int cpu_write_elf32_note(write_core_dump_function f, CPUArchState *env,
  24. int cpuid, void *opaque);
  25. int cpu_write_elf64_qemunote(write_core_dump_function f, CPUArchState *env,
  26. void *opaque);
  27. int cpu_write_elf32_qemunote(write_core_dump_function f, CPUArchState *env,
  28. void *opaque);
  29. int cpu_get_dump_info(ArchDumpInfo *info);
  30. ssize_t cpu_get_note_size(int class, int machine, int nr_cpus);
  31. #endif