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: "Eric Farman" <farman@linux.ibm.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Andrew Jeffery" <andrew@codeconstruct.com.au>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Eric Auger" <eric.auger@redhat.com>,
	qemu-arm@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Pavel Dovgalyuk" <pavel.dovgaluk@ispras.ru>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	qemu-s390x@nongnu.org, "Beraldo Leal" <bleal@redhat.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Luis Machado" <luis.machado@arm.com>
Subject: [PATCH 1/3] gdbstub: use a better signal when we halt for IO reasons
Date: Thu, 30 Nov 2023 15:33:31 +0000	[thread overview]
Message-ID: <20231130153333.2424775-2-alex.bennee@linaro.org> (raw)
In-Reply-To: <20231130153333.2424775-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.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Luis Machado <luis.machado@arm.com>
Message-Id: <20231123131905.2640498-1-alex.bennee@linaro.org>
---
 gdbstub/internals.h | 1 +
 gdbstub/system.c    | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

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-11-30 15:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 15:33 [PATCH 0/3] final fixes for 8.2 Alex Bennée
2023-11-30 15:33 ` Alex Bennée [this message]
2023-11-30 15:33 ` [PATCH 2/3] docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS Alex Bennée
2023-11-30 16:06   ` Cédric Le Goater
2023-11-30 16:25   ` Philippe Mathieu-Daudé
2023-11-30 16:40   ` Peter Maydell
2023-11-30 16:59     ` Alex Bennée
2023-11-30 15:33 ` [PATCH 3/3] gitlab: add optional job to run flaky avocado tests Alex Bennée
2023-11-30 16:05 ` [PATCH 0/3] final fixes for 8.2 Richard Henderson

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=20231130153333.2424775-2-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=andrew@codeconstruct.com.au \
    --cc=aurelien@aurel32.net \
    --cc=bleal@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=clg@kaod.org \
    --cc=crosa@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=joel@jms.id.au \
    --cc=luis.machado@arm.com \
    --cc=pasic@linux.ibm.com \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    --cc=ysato@users.sourceforge.jp \
    /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).