aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-09-18 21:45:47 +0200
committerLaurent Vivier <laurent@vivier.eu>2022-09-27 09:29:33 +0200
commit35dffc568164f08ebdb42bc8eb6307fed9af0ffe (patch)
treecd293601b51bfb97e8e323685b66eeaad7e07445 /linux-user
parentcc054c6f139cf54ce8fbefd6fd536f50b4cba694 (diff)
downloadqemu-35dffc568164f08ebdb42bc8eb6307fed9af0ffe.zip
qemu-35dffc568164f08ebdb42bc8eb6307fed9af0ffe.tar.gz
qemu-35dffc568164f08ebdb42bc8eb6307fed9af0ffe.tar.bz2
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>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/cpu_loop-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-user/cpu_loop-common.h b/linux-user/cpu_loop-common.h
index dc0042e..36ff5b1 100644
--- a/linux-user/cpu_loop-common.h
+++ b/linux-user/cpu_loop-common.h
@@ -27,9 +27,11 @@
do { \
CPUState *cs = env_cpu(env); \
fprintf(stderr, fmt , ## __VA_ARGS__); \
+ fprintf(stderr, "Failing executable: %s\n", exec_path); \
cpu_dump_state(cs, stderr, 0); \
if (qemu_log_separate()) { \
qemu_log(fmt, ## __VA_ARGS__); \
+ qemu_log("Failing executable: %s\n", exec_path); \
log_cpu_state(cs, 0); \
} \
} while (0)