You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/linux-user/i386
Helge Deller bd5ccd6108 linux-user: Add guest memory layout to exception dump
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.

This patch takes another approach by re-defining EXCP_DUMP() to call
target_exception_dump(), which is in syscall.c, consolidates the log
print functions and allows to add the call to dump the memory layout.

Beside a reduced code footprint, this approach keeps the changes across
the various callers minimal, and keeps EXCP_DUMP() highlighted as
important macro/function.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <Y1bzAWbw07WBKPxw@p100>
[lv: remove pc declaration and setting]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2 years ago
..
cpu_loop.c linux-user: Add guest memory layout to exception dump 2 years ago
meson.build meson: linux-user 4 years ago
signal.c linux-user: i386/signal: support XSAVE/XRSTOR for signal frame fpstate 2 years ago
sockbits.h linux-user: move socket.h generic definitions to generic/sockbits.h 7 years ago
syscall_32.tbl linux-user: update syscall.tbl to Linux v5.13 3 years ago
syscall_nr.h meson: linux-user 4 years ago
syscallhdr.sh linux-user, i386: add syscall table generation support 5 years ago
target_cpu.h linux user: Fix Lesser GPL version number 4 years ago
target_elf.h linux-user: use 'max' instead of 'qemu32' / 'qemu64' by default 2 years ago
target_errno_defs.h linux-user: Extract target errno to 'target_errno_defs.h' 3 years ago
target_fcntl.h linux-user: move generic fcntl definitions to generic/fcntl.h 7 years ago
target_mman.h linux-user: Provide MADV_* definitions 2 years ago
target_prctl.h linux-user: Split out do_prctl and subroutines 3 years ago
target_resource.h linux-user: Move generic TARGET_RLIMIT* definitions to generic/target_resource.h 3 years ago
target_signal.h linux-user: Move target_signal.h generic definitions to generic/signal.h 3 years ago
target_structs.h linux-user: Move target_struct.h generic definitions to generic/ 3 years ago
target_syscall.h linux-user: target_syscall.h remove definition TARGET_MINSIGSTKSZ 3 years ago
termbits.h linux-user: Add generic 'termbits.h' for some archs 4 years ago