qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"Luis Machado" <luis.machado@arm.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PULL 1/6] gdbstub: use a better signal when we halt for IO reasons
Date: Fri,  1 Dec 2023 15:12:23 +0000	[thread overview]
Message-ID: <20231201151228.2610209-2-alex.bennee@linaro.org> (raw)
In-Reply-To: <20231201151228.2610209-1-alex.bennee@linaro.org>

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>

diff --git a/gdbstub/internals.h b/gdbstub/internals.h
index 465c24b36e..5c0c725e54 100644
--- a/gdbstub/internals.h
+++ b/gdbstub/internals.h
@@ -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
diff --git a/gdbstub/system.c b/gdbstub/system.c
index 783ac140b9..83fd452800 100644
--- a/gdbstub/system.c
+++ b/gdbstub/system.c
@@ -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();
-- 
2.39.2



  reply	other threads:[~2023-12-01 15:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01 15:12 [PULL 0/6] gdbstub, avocado and gitlab updates Alex Bennée
2023-12-01 15:12 ` Alex Bennée [this message]
2023-12-01 15:12 ` [PULL 2/6] docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS Alex Bennée
2023-12-01 15:12 ` [PULL 3/6] tests/avocado: drop BootLinuxConsole.test_mips_malta_cpio test Alex Bennée
2023-12-01 16:49   ` Philippe Mathieu-Daudé
2023-12-01 17:46     ` Alex Bennée
2023-12-01 15:12 ` [PULL 4/6] tests/avocado: tag sbsa tests as tcg only Alex Bennée
2023-12-01 15:12 ` [PULL 5/6] gitlab: build the correct microblaze target Alex Bennée
2023-12-01 15:12 ` [PULL 6/6] gitlab: add optional job to run flaky avocado tests Alex Bennée
2023-12-01 16:50 ` [PULL 0/6] gdbstub, avocado and gitlab updates Philippe Mathieu-Daudé
2023-12-01 16:52   ` Philippe Mathieu-Daudé
2023-12-01 17:50     ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231201151228.2610209-2-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=luis.machado@arm.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).