mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 04:43:54 -06:00
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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue