]> xenbits.xensource.com Git - people/aperard/qemu-dm.git/commitdiff
gdbstub: use a better signal when we halt for IO reasons
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 1 Dec 2023 09:36:27 +0000 (09:36 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Fri, 1 Dec 2023 14:00:52 +0000 (14:00 +0000)
The gdb description GDB_SIGNAL_IO is "I/O possible" and by default gdb
will try and restart the guest, getting us nowhere. Report
GDB_SIGNAL_STOP instead which should at least halt the session at the
failure point.

Reviewed-by: Luis Machado <luis.machado@arm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231201093633.2551497-2-alex.bennee@linaro.org>

gdbstub/internals.h
gdbstub/system.c

index 465c24b36e3b93c1c84975a2f28713a16892a91f..5c0c725e54cfd114c3b25c3e6b5ba4905c26e601 100644 (file)
@@ -24,6 +24,7 @@ enum {
     GDB_SIGNAL_TRAP = 5,
     GDB_SIGNAL_ABRT = 6,
     GDB_SIGNAL_ALRM = 14,
+    GDB_SIGNAL_STOP = 17,
     GDB_SIGNAL_IO = 23,
     GDB_SIGNAL_XCPU = 24,
     GDB_SIGNAL_UNKNOWN = 143
index 783ac140b9829c7ad28a357e010698844cf801da..83fd452800bdca28a2061af2a1dceb709fbc848c 100644 (file)
@@ -183,7 +183,7 @@ static void gdb_vm_state_change(void *opaque, bool running, RunState state)
         break;
     case RUN_STATE_IO_ERROR:
         trace_gdbstub_hit_io_error();
-        ret = GDB_SIGNAL_IO;
+        ret = GDB_SIGNAL_STOP;
         break;
     case RUN_STATE_WATCHDOG:
         trace_gdbstub_hit_watchdog();