diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2025-01-16 16:02:30 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2025-01-17 10:43:41 +0000 |
commit | 552260aeae26edebb1d660dae1e0c76fa234364b (patch) | |
tree | 028e42757f8c6408911aa73acc27d8250451d90d | |
parent | 4d5d933bbc7cc52f6cc6b9021f91fa06266222d5 (diff) | |
download | qemu-552260aeae26edebb1d660dae1e0c76fa234364b.zip qemu-552260aeae26edebb1d660dae1e0c76fa234364b.tar.gz qemu-552260aeae26edebb1d660dae1e0c76fa234364b.tar.bz2 |
semihosting: add guest_error logging for failed opens
This usually indicates the semihosting call was expecting to find
something but didn't.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250116160306.1709518-2-alex.bennee@linaro.org>
-rw-r--r-- | semihosting/syscalls.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c index c40348f..f6451d9 100644 --- a/semihosting/syscalls.c +++ b/semihosting/syscalls.c @@ -7,6 +7,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "gdbstub/syscalls.h" #include "semihosting/guestfd.h" @@ -287,6 +288,7 @@ static void host_open(CPUState *cs, gdb_syscall_complete_cb complete, ret = open(p, host_flags, mode); if (ret < 0) { + qemu_log_mask(LOG_GUEST_ERROR, "%s: failed to open %s\n", __func__, p); complete(cs, -1, errno); } else { int guestfd = alloc_guestfd(); |