On 10/25/22 04:25, Richard Henderson wrote:
On 10/25/22 11:57, Helge Deller wrote:
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?
A question.
Did you really wanted the host mappings included?
No.
I wanted just the guest mappings.
If so, fine.
If not, pointing out there's a better function to use.
I'm not sure if it's the better choice.
It depends on the targetted audience of such output.
This is linux-user, so if someone runs a program he would expect
output of crash dumps like as he would see them on a native machine.
Showing "external host emulation mappings" seems strange.
I'm running a debian hppa buildd server with linux-user.
I've seen many guest crashes like SEGVs, out-of-memory (in guest),
glibc's ABORT() calls [which e.g. triggers a CPU exception] or other
things. In all those cases the guest mapping was relevant, not
the host mapping.
Helge