Custom core file
Duane Ellis
duane@duaneellis.com
Wed Sep 28 14:28:00 GMT 2016
> 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 …..
More information about the Gdb
mailing list