This is an old revision of the document!

Stefan Hajnoczi: GDB Remote Debugging


QEMU memory dumps

The QEMU monitor (CTRL+ALT+2) supports debug commands to inspect registers and memory. Unfortunately, QEMU only honors paged virtual memory. Since gPXE sets up a virtual memory segment with a non-zero base address, all virtual addresses need to be adjusted before using them to inspect memory in QEMU.

The virtual memory offset is available inside gPXE as virt_offset (see arch/i386/transitions/librm.S). It can be printed out by placing a printf call in core/main.c.

When dumping memory, remember to add the value of virt_offset to any virtual memory addresses. QEMU is effectively using physical memory only.

QR Code
QR Code soc:2008:stefanha:notes:start (generated for current page)