mirror of https://github.com/xemu-project/xemu.git
linux-user: Log failing executable in EXCP_DUMP()
Enhance the EXCP_DUMP() macro to print out the failing program too. During debugging it's sometimes hard to track down the actual failing program if you are e.g. building a whole debian package. Signed-off-by: Helge Deller <deller@gmx.de> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220918194555.83535-5-deller@gmx.de> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
cc054c6f13
commit
35dffc5681
|
@ -27,9 +27,11 @@
|
||||||
do { \
|
do { \
|
||||||
CPUState *cs = env_cpu(env); \
|
CPUState *cs = env_cpu(env); \
|
||||||
fprintf(stderr, fmt , ## __VA_ARGS__); \
|
fprintf(stderr, fmt , ## __VA_ARGS__); \
|
||||||
|
fprintf(stderr, "Failing executable: %s\n", exec_path); \
|
||||||
cpu_dump_state(cs, stderr, 0); \
|
cpu_dump_state(cs, stderr, 0); \
|
||||||
if (qemu_log_separate()) { \
|
if (qemu_log_separate()) { \
|
||||||
qemu_log(fmt, ## __VA_ARGS__); \
|
qemu_log(fmt, ## __VA_ARGS__); \
|
||||||
|
qemu_log("Failing executable: %s\n", exec_path); \
|
||||||
log_cpu_state(cs, 0); \
|
log_cpu_state(cs, 0); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
Loading…
Reference in New Issue