On 10/25/22 00:35, Richard Henderson wrote:
On 10/25/22 06:18, Helge Deller wrote:
When the emulation stops with a hard exception it's very useful for
debugging purposes to dump the current guest memory layout (for an
example see /proc/self/maps) beside the CPU registers.

The open_self_maps() function provides such a memory dump, but since
it's located in the syscall.c file, various changes (add #includes, make
this function externally visible, ...) are needed to be able to call it
from the existing EXCP_DUMP() macro.

/proc/self/maps has all of the qemu mappings in it as well.

I'm not quite sure on how to understand your comments above.
Just comments or NAK to the patch?

*Main* feature of this patch is that output like /proc/self/maps
ends up on stdout and in the log file (if qemu log was enabled)
at all, before the program exits and /proc/self/maps is gone.
Quite useful for bug reports from other users too...

The page_dump() function provides exclusively the guest mappings.

Which is usually sufficient in this case, and has the advantage that it
shows the guest-stack and -heap areas.

Helge

Reply via email to