Re: Custom core file

Duane Ellis
2016-09-28T14:28:24Z

> I have a self-written bare-metal hypervisor for x86 arch and I'd like to perform postmortem debugging of it's core (not VM, hypervisor itself!).
> So the idea is to save physical memory state and later use GDB to interpret it.

[snip]

> Or may be there are any other ways to feed a raw physical memory to GDB?

here’s a method

GDB has a built in Python interpreter.

GDB has commands such as “dump” and “restore” that allow you to copy a binary file into memory.

Thus - you can use a bit of python to extract your custom core dump
For example you might use Python to unpack your custom core file into various temp binary files
Then in the same python script execute dump/restore commands to load these into memory

http://www.delorie.com/gnu/docs/gdb/gdb_69.html

See: restore FILENAME binary …..