All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR)
@ 2026-02-03 11:51 Alex Bennée
  2026-02-03 11:51 ` [PATCH 01/11] meson-buildoptions: Remove duplicated entry of --gdb in the help text Alex Bennée
                   ` (10 more replies)
  0 siblings, 11 replies; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

Flushing my queue for gdbstub/next and I'll roll a PR by the end of
the week to get the bug fixes in. The other re-factoring patches are
towards a longer term goal of supporting more stop packet reply types
but aren't critical to merge save reducing the delta. I won't include
them in the PR unless reviewed:

  gdbstub/user: rename and use bool for running_state
  include/gdbstub: fix typo
  gdbstub: pass GString to gdb_build_stop_packet
  gdbstub/user: localise variables for reading gdb socket
  gdbstub: extract stop reply message construction
  gdbstub: remove the need for goto cleanup

Alex.

Alex Bennée (8):
  meson-buildoptions: Remove duplicated entry of --gdb in the help text
  Makefile: add python script dependency for meson-buildoptions.sh
  gdbstub: remove the need for goto cleanup
  gdbstub: extract stop reply message construction
  gdbstub/user: localise variables for reading gdb socket
  gdbstub: pass GString to gdb_build_stop_packet
  include/gdbstub: fix typo
  gdbstub/user: rename and use bool for running_state

Yodel Eldar (3):
  include/gdbstub/syscalls: Add EIO and ENOSYS GDB File-I/O errno values
  gdbstub: Export host_to_gdb_errno File-I/O helper function
  gdbstub/user-target: Convert host errno to GDB File-I/O errno

 Makefile                      |  2 +-
 gdbstub/internals.h           | 10 ++++++++
 include/gdbstub/commands.h    |  2 +-
 include/gdbstub/syscalls.h    | 11 +++++++++
 gdbstub/gdbstub.c             | 45 +++++++++++++++--------------------
 gdbstub/syscalls.c            | 36 ++++++++++++++++++++++++++++
 gdbstub/system.c              | 11 +++++++++
 gdbstub/user-target.c         | 13 ++++++----
 gdbstub/user.c                | 40 ++++++++++++++++++++-----------
 target/m68k/m68k-semi.c       | 29 ----------------------
 scripts/meson-buildoptions.py |  9 ++++++-
 scripts/meson-buildoptions.sh |  1 -
 12 files changed, 132 insertions(+), 77 deletions(-)

-- 
2.47.3



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 01/11] meson-buildoptions: Remove duplicated entry of --gdb in the help text
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
@ 2026-02-03 11:51 ` Alex Bennée
  2026-02-03 11:51 ` [PATCH 02/11] Makefile: add python script dependency for meson-buildoptions.sh Alex Bennée
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier, Gustavo Romero

Since --gdb has recently been added to meson_options.txt, the help
text shows up twice in the output of "./configure --help":

 $ ./configure --help | grep gdb
   --gdb=GDB-path           gdb to use for gdbstub tests [/usr/bin/gdb]
   --gdb=VALUE              Path to GDB

As the probed value is of interest we want to keep the configure text
so make meson-buildoptions able to handle deferring to configure.

Fixes: b46b3818cf8 ("tests/functional: Provide GDB to the functional tests")
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
---
 scripts/meson-buildoptions.py | 9 ++++++++-
 scripts/meson-buildoptions.sh | 1 -
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py
index e636d258e8a..9e3a75c8b11 100644
--- a/scripts/meson-buildoptions.py
+++ b/scripts/meson-buildoptions.py
@@ -53,6 +53,11 @@
     "werror",
 }
 
+# Options that configure prints help for, so we can skip
+CONFIGURE_HELP = {
+    "gdb",
+}
+
 # Builtin options that should be definable via configure.  Some of the others
 # we really do not want (e.g. c_args is defined via the native file, not
 # via -D, because it's a mix of CFLAGS and --extra-cflags); for specific
@@ -189,7 +194,9 @@ def print_help(options):
         key = cli_help_key(opt)
         # The first section includes options that have an arguments,
         # and booleans (i.e., only one of enable/disable makes sense)
-        if require_arg(opt):
+        if opt["name"] in CONFIGURE_HELP:
+            pass
+        elif require_arg(opt):
             metavar = cli_metavar(opt)
             left = f"--{key}={metavar}"
             help_line(left, opt, 27, True)
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 3d0d1323446..e8edc5252a3 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -58,7 +58,6 @@ meson_options_help() {
   printf "%s\n" '  --enable-ubsan           enable undefined behaviour sanitizer'
   printf "%s\n" '  --firmwarepath=VALUES    search PATH for firmware files [share/qemu-'
   printf "%s\n" '                           firmware]'
-  printf "%s\n" '  --gdb=VALUE              Path to GDB'
   printf "%s\n" '  --iasl=VALUE             Path to ACPI disassembler'
   printf "%s\n" '  --includedir=VALUE       Header file directory [include]'
   printf "%s\n" '  --interp-prefix=VALUE    where to find shared libraries etc., use %M for'
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 02/11] Makefile: add python script dependency for meson-buildoptions.sh
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
  2026-02-03 11:51 ` [PATCH 01/11] meson-buildoptions: Remove duplicated entry of --gdb in the help text Alex Bennée
@ 2026-02-03 11:51 ` Alex Bennée
  2026-02-03 11:51 ` [PATCH 03/11] gdbstub: remove the need for goto cleanup Alex Bennée
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

If we update the script we should also make sure we regenerate the
help text.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 9fb55dcf330..54547a37b1a 100644
--- a/Makefile
+++ b/Makefile
@@ -130,7 +130,7 @@ Makefile.mtest: build.ninja scripts/mtest2make.py
 
 .PHONY: update-buildoptions
 all update-buildoptions: $(SRC_PATH)/scripts/meson-buildoptions.sh
-$(SRC_PATH)/scripts/meson-buildoptions.sh: $(SRC_PATH)/meson_options.txt
+$(SRC_PATH)/scripts/meson-buildoptions.sh: $(SRC_PATH)/meson_options.txt $(SRC_PATH)/scripts/meson-buildoptions.py
 	$(MESON) introspect --buildoptions $(SRC_PATH)/meson.build | $(PYTHON) \
 	  scripts/meson-buildoptions.py > $@.tmp && mv $@.tmp $@
 endif
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 03/11] gdbstub: remove the need for goto cleanup
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
  2026-02-03 11:51 ` [PATCH 01/11] meson-buildoptions: Remove duplicated entry of --gdb in the help text Alex Bennée
  2026-02-03 11:51 ` [PATCH 02/11] Makefile: add python script dependency for meson-buildoptions.sh Alex Bennée
@ 2026-02-03 11:51 ` Alex Bennée
  2026-02-03 22:06   ` Yodel Eldar
  2026-02-03 11:51 ` [PATCH 04/11] gdbstub: extract stop reply message construction Alex Bennée
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

We already set a default error reply which we can only overwrite if we
successfully follow the chain of checks. Initialise the variables as
NULL and use that to gate the construction of the filled out
stop/reply packet.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 gdbstub/gdbstub.c | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 1f8cd118924..d4db7ba30cc 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -1413,36 +1413,32 @@ static void handle_v_cont(GArray *params, void *user_ctx)
 
 static void handle_v_attach(GArray *params, void *user_ctx)
 {
-    GDBProcess *process;
-    CPUState *cpu;
+    GDBProcess *process = NULL;
+    CPUState *cpu = NULL;
 
+    /* Default error reply */
     g_string_assign(gdbserver_state.str_buf, "E22");
-    if (!params->len) {
-        goto cleanup;
-    }
-
-    process = gdb_get_process(gdb_get_cmd_param(params, 0)->val_ul);
-    if (!process) {
-        goto cleanup;
+    if (params->len) {
+        process = gdb_get_process(gdb_get_cmd_param(params, 0)->val_ul);
     }
 
-    cpu = gdb_get_first_cpu_in_process(process);
-    if (!cpu) {
-        goto cleanup;
+    if (process) {
+        cpu = gdb_get_first_cpu_in_process(process);
     }
 
-    process->attached = true;
-    gdbserver_state.g_cpu = cpu;
-    gdbserver_state.c_cpu = cpu;
+    if (cpu) {
+        process->attached = true;
+        gdbserver_state.g_cpu = cpu;
+        gdbserver_state.c_cpu = cpu;
 
     if (gdbserver_state.allow_stop_reply) {
         g_string_printf(gdbserver_state.str_buf, "T%02xthread:", GDB_SIGNAL_TRAP);
         gdb_append_thread_id(cpu, gdbserver_state.str_buf);
         g_string_append_c(gdbserver_state.str_buf, ';');
         gdbserver_state.allow_stop_reply = false;
-cleanup:
-        gdb_put_strbuf();
     }
+
+    gdb_put_strbuf();
 }
 
 static void handle_v_kill(GArray *params, void *user_ctx)
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 04/11] gdbstub: extract stop reply message construction
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
                   ` (2 preceding siblings ...)
  2026-02-03 11:51 ` [PATCH 03/11] gdbstub: remove the need for goto cleanup Alex Bennée
@ 2026-02-03 11:51 ` Alex Bennée
  2026-02-04  4:29   ` Richard Henderson
  2026-02-03 11:51 ` [PATCH 05/11] gdbstub/user: localise variables for reading gdb socket Alex Bennée
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

The stop reply message we send can include a lot of extra information
and a bunch is mode dependant. Extract the construction into a helper
and add specialised versions for system and user mode.

The correct response for system mode should be of the form:

  T05core:N;

Where N is the core ID.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 gdbstub/internals.h |  7 +++++++
 gdbstub/gdbstub.c   | 15 ++++++---------
 gdbstub/system.c    | 11 +++++++++++
 gdbstub/user.c      | 12 ++++++++++++
 4 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/gdbstub/internals.h b/gdbstub/internals.h
index 92466b28c18..3134a6e8eb2 100644
--- a/gdbstub/internals.h
+++ b/gdbstub/internals.h
@@ -237,4 +237,11 @@ void gdb_breakpoint_remove_all(CPUState *cs);
 int gdb_target_memory_rw_debug(CPUState *cs, hwaddr addr,
                                uint8_t *buf, int len, bool is_write);
 
+/**
+ * gdb_build_stop_packet() - craft the stop packet
+ * @cs: CPUState
+ */
+
+void gdb_build_stop_packet(CPUState *cs);
+
 #endif /* GDBSTUB_INTERNALS_H */
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index d4db7ba30cc..c82fb5ad324 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -1431,11 +1431,10 @@ static void handle_v_attach(GArray *params, void *user_ctx)
         gdbserver_state.g_cpu = cpu;
         gdbserver_state.c_cpu = cpu;
 
-    if (gdbserver_state.allow_stop_reply) {
-        g_string_printf(gdbserver_state.str_buf, "T%02xthread:", GDB_SIGNAL_TRAP);
-        gdb_append_thread_id(cpu, gdbserver_state.str_buf);
-        g_string_append_c(gdbserver_state.str_buf, ';');
-        gdbserver_state.allow_stop_reply = false;
+        if (gdbserver_state.allow_stop_reply) {
+            gdb_build_stop_packet(cpu);
+            gdbserver_state.allow_stop_reply = false;
+        }
     }
 
     gdb_put_strbuf();
@@ -2037,11 +2036,9 @@ static void handle_gen_set(GArray *params, void *user_ctx)
 static void handle_target_halt(GArray *params, void *user_ctx)
 {
     if (gdbserver_state.allow_stop_reply) {
-        g_string_printf(gdbserver_state.str_buf, "T%02xthread:", GDB_SIGNAL_TRAP);
-        gdb_append_thread_id(gdbserver_state.c_cpu, gdbserver_state.str_buf);
-        g_string_append_c(gdbserver_state.str_buf, ';');
-        gdb_put_strbuf();
+        gdb_build_stop_packet(gdbserver_state.c_cpu);
         gdbserver_state.allow_stop_reply = false;
+        gdb_put_strbuf();
     }
     /*
      * Remove all the breakpoints when this query is issued,
diff --git a/gdbstub/system.c b/gdbstub/system.c
index 79f80256e3a..6963c930b01 100644
--- a/gdbstub/system.c
+++ b/gdbstub/system.c
@@ -662,3 +662,14 @@ void gdb_breakpoint_remove_all(CPUState *cs)
         ops->remove_all_breakpoints(cs);
     }
 }
+
+/*
+ * The minimal system-mode stop reply packet is:
+ *   T05core:{id};
+ */
+
+void gdb_build_stop_packet(CPUState *cs)
+{
+    g_string_printf(gdbserver_state.str_buf,
+                    "T%02xcore:%02x;", GDB_SIGNAL_TRAP, gdb_get_cpu_index(cs));
+}
diff --git a/gdbstub/user.c b/gdbstub/user.c
index a2327c61352..cc71cda3e33 100644
--- a/gdbstub/user.c
+++ b/gdbstub/user.c
@@ -974,3 +974,15 @@ void gdb_handle_query_xfer_siginfo(GArray *params, void *user_ctx)
     gdb_put_packet_binary(gdbserver_state.str_buf->str,
                           gdbserver_state.str_buf->len, true);
 }
+
+/*
+ * The minimal user-mode stop reply packet is:
+ *   T05thread:{id};
+ */
+
+void gdb_build_stop_packet(CPUState *cs)
+{
+    g_string_printf(gdbserver_state.str_buf, "T%02xthread:", GDB_SIGNAL_TRAP);
+    gdb_append_thread_id(cs, gdbserver_state.str_buf);
+    g_string_append_c(gdbserver_state.str_buf, ';');
+}
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 05/11] gdbstub/user: localise variables for reading gdb socket
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
                   ` (3 preceding siblings ...)
  2026-02-03 11:51 ` [PATCH 04/11] gdbstub: extract stop reply message construction Alex Bennée
@ 2026-02-03 11:51 ` Alex Bennée
  2026-02-04  4:35   ` Richard Henderson
  2026-02-03 11:51 ` [PATCH 06/11] gdbstub: pass GString to gdb_build_stop_packet Alex Bennée
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

Keep things tidy by moving the declarations to the block where they
are used.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 gdbstub/user.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/gdbstub/user.c b/gdbstub/user.c
index cc71cda3e33..c7a3ef947ed 100644
--- a/gdbstub/user.c
+++ b/gdbstub/user.c
@@ -198,9 +198,6 @@ void gdb_qemu_exit(int code)
 int gdb_handlesig(CPUState *cpu, int sig, const char *reason, void *siginfo,
                   int siginfo_len)
 {
-    char buf[256];
-    int n;
-
     if (!gdbserver_state.init || gdbserver_user_state.fd < 0) {
         return sig;
     }
@@ -246,11 +243,10 @@ int gdb_handlesig(CPUState *cpu, int sig, const char *reason, void *siginfo,
     gdbserver_state.state = RS_IDLE;
     gdbserver_user_state.running_state = 0;
     while (gdbserver_user_state.running_state == 0) {
-        n = read(gdbserver_user_state.fd, buf, 256);
+        char buf[256];
+        int n = read(gdbserver_user_state.fd, buf, 256);
         if (n > 0) {
-            int i;
-
-            for (i = 0; i < n; i++) {
+            for (int i = 0; i < n; i++) {
                 gdb_read_byte(buf[i]);
             }
         } else {
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 06/11] gdbstub: pass GString to gdb_build_stop_packet
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
                   ` (4 preceding siblings ...)
  2026-02-03 11:51 ` [PATCH 05/11] gdbstub/user: localise variables for reading gdb socket Alex Bennée
@ 2026-02-03 11:51 ` Alex Bennée
  2026-02-03 15:44   ` Alex Bennée
  2026-02-04  4:37   ` Richard Henderson
  2026-02-03 11:51 ` [PATCH 07/11] include/gdbstub/syscalls: Add EIO and ENOSYS GDB File-I/O errno values Alex Bennée
                   ` (4 subsequent siblings)
  10 siblings, 2 replies; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

The other functions we are going to clean-up work variously with there
own dynamically allocated GStrings or with the common shared buffer.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 gdbstub/internals.h | 5 ++++-
 gdbstub/gdbstub.c   | 4 ++--
 gdbstub/system.c    | 4 ++--
 gdbstub/user.c      | 8 ++++----
 4 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/gdbstub/internals.h b/gdbstub/internals.h
index 3134a6e8eb2..9b25bf58b8e 100644
--- a/gdbstub/internals.h
+++ b/gdbstub/internals.h
@@ -239,9 +239,12 @@ int gdb_target_memory_rw_debug(CPUState *cs, hwaddr addr,
 
 /**
  * gdb_build_stop_packet() - craft the stop packet
+ * @buf: GString buffer for building the packet
  * @cs: CPUState
+ *
+ * Craft the Stop/Reply packet when we halt.
  */
 
-void gdb_build_stop_packet(CPUState *cs);
+void gdb_build_stop_packet(GString *buf, CPUState *cs);
 
 #endif /* GDBSTUB_INTERNALS_H */
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index c82fb5ad324..b45eb7c7b2b 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -1432,7 +1432,7 @@ static void handle_v_attach(GArray *params, void *user_ctx)
         gdbserver_state.c_cpu = cpu;
 
         if (gdbserver_state.allow_stop_reply) {
-            gdb_build_stop_packet(cpu);
+            gdb_build_stop_packet(gdbserver_state.str_buf, cpu);
             gdbserver_state.allow_stop_reply = false;
         }
     }
@@ -2036,7 +2036,7 @@ static void handle_gen_set(GArray *params, void *user_ctx)
 static void handle_target_halt(GArray *params, void *user_ctx)
 {
     if (gdbserver_state.allow_stop_reply) {
-        gdb_build_stop_packet(gdbserver_state.c_cpu);
+        gdb_build_stop_packet(gdbserver_state.str_buf, gdbserver_state.c_cpu);
         gdbserver_state.allow_stop_reply = false;
         gdb_put_strbuf();
     }
diff --git a/gdbstub/system.c b/gdbstub/system.c
index 6963c930b01..8ec8b7ea336 100644
--- a/gdbstub/system.c
+++ b/gdbstub/system.c
@@ -668,8 +668,8 @@ void gdb_breakpoint_remove_all(CPUState *cs)
  *   T05core:{id};
  */
 
-void gdb_build_stop_packet(CPUState *cs)
+void gdb_build_stop_packet(GString *buf, CPUState *cs)
 {
-    g_string_printf(gdbserver_state.str_buf,
+    g_string_printf(buf,
                     "T%02xcore:%02x;", GDB_SIGNAL_TRAP, gdb_get_cpu_index(cs));
 }
diff --git a/gdbstub/user.c b/gdbstub/user.c
index c7a3ef947ed..a16f37616b1 100644
--- a/gdbstub/user.c
+++ b/gdbstub/user.c
@@ -976,9 +976,9 @@ void gdb_handle_query_xfer_siginfo(GArray *params, void *user_ctx)
  *   T05thread:{id};
  */
 
-void gdb_build_stop_packet(CPUState *cs)
+void gdb_build_stop_packet(GString *buf, CPUState *cs)
 {
-    g_string_printf(gdbserver_state.str_buf, "T%02xthread:", GDB_SIGNAL_TRAP);
-    gdb_append_thread_id(cs, gdbserver_state.str_buf);
-    g_string_append_c(gdbserver_state.str_buf, ';');
+    g_string_printf(buf, "T%02xthread:", GDB_SIGNAL_TRAP);
+    gdb_append_thread_id(cs, buf);
+    g_string_append_c(buf, ';');
 }
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 07/11] include/gdbstub/syscalls: Add EIO and ENOSYS GDB File-I/O errno values
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
                   ` (5 preceding siblings ...)
  2026-02-03 11:51 ` [PATCH 06/11] gdbstub: pass GString to gdb_build_stop_packet Alex Bennée
@ 2026-02-03 11:51 ` Alex Bennée
  2026-02-03 11:51 ` [PATCH 08/11] gdbstub: Export host_to_gdb_errno File-I/O helper function Alex Bennée
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier, Yodel Eldar

From: Yodel Eldar <yodel.eldar@yodel.dev>

This patch adds the EIO and ENOSYS errno values that were missing from
the GDB Manual [1] when the other errno values were defined.

[1] https://sourceware.org/gdb/current/onlinedocs/gdb.html/Errno-Values.html

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260116014612.226183-2-yodel.eldar@yodel.dev>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/gdbstub/syscalls.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/gdbstub/syscalls.h b/include/gdbstub/syscalls.h
index d63228e96b4..6200416f77a 100644
--- a/include/gdbstub/syscalls.h
+++ b/include/gdbstub/syscalls.h
@@ -22,6 +22,7 @@
 #define GDB_EPERM           1
 #define GDB_ENOENT          2
 #define GDB_EINTR           4
+#define GDB_EIO             5
 #define GDB_EBADF           9
 #define GDB_EACCES         13
 #define GDB_EFAULT         14
@@ -37,6 +38,7 @@
 #define GDB_ENOSPC         28
 #define GDB_ESPIPE         29
 #define GDB_EROFS          30
+#define GDB_ENOSYS         88
 #define GDB_ENAMETOOLONG   91
 #define GDB_EUNKNOWN       9999
 
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 08/11] gdbstub: Export host_to_gdb_errno File-I/O helper function
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
                   ` (6 preceding siblings ...)
  2026-02-03 11:51 ` [PATCH 07/11] include/gdbstub/syscalls: Add EIO and ENOSYS GDB File-I/O errno values Alex Bennée
@ 2026-02-03 11:51 ` Alex Bennée
  2026-02-03 11:51 ` [PATCH 09/11] gdbstub/user-target: Convert host errno to GDB File-I/O errno Alex Bennée
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier, Yodel Eldar

From: Yodel Eldar <yodel.eldar@yodel.dev>

Move host_to_gdb_errno from target/m68k/m68k-semi.c to
gdbstub/syscalls.c. Declare it in include/gdbstub/syscalls.h.

Add both newly added GDB File-I/O supported errno values, EIO and
ENOSYS, to the mapping.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260116014612.226183-3-yodel.eldar@yodel.dev>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/gdbstub/syscalls.h |  9 +++++++++
 gdbstub/syscalls.c         | 36 ++++++++++++++++++++++++++++++++++++
 target/m68k/m68k-semi.c    | 29 -----------------------------
 3 files changed, 45 insertions(+), 29 deletions(-)

diff --git a/include/gdbstub/syscalls.h b/include/gdbstub/syscalls.h
index 6200416f77a..a09559128b1 100644
--- a/include/gdbstub/syscalls.h
+++ b/include/gdbstub/syscalls.h
@@ -102,6 +102,15 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...);
  */
 int use_gdb_syscalls(void);
 
+/**
+ * host_to_gdb_errno: convert host errno to GDB errno value
+ * @err: errno from host
+ *
+ * Given an error number from the host, this helper function returns
+ * its GDB File-I/O specified representation.
+ */
+int host_to_gdb_errno(int err);
+
 /**
  * gdb_exit: exit gdb session, reporting inferior status
  * @code: exit code reported
diff --git a/gdbstub/syscalls.c b/gdbstub/syscalls.c
index d8bb90cc1c7..15050984a04 100644
--- a/gdbstub/syscalls.c
+++ b/gdbstub/syscalls.c
@@ -145,6 +145,42 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...)
     gdb_syscall_handling(gdbserver_syscall_state.syscall_buf);
 }
 
+/*
+ * Map host error numbers to their GDB protocol counterparts.
+ * For the list of GDB File-I/O supported error numbers, please consult:
+ * https://sourceware.org/gdb/current/onlinedocs/gdb.html/Errno-Values.html
+ */
+int host_to_gdb_errno(int err)
+{
+#define E(X)  case E##X: return GDB_E##X
+    switch (err) {
+    E(PERM);
+    E(NOENT);
+    E(INTR);
+    E(IO);
+    E(BADF);
+    E(ACCES);
+    E(FAULT);
+    E(BUSY);
+    E(EXIST);
+    E(NODEV);
+    E(NOTDIR);
+    E(ISDIR);
+    E(INVAL);
+    E(NFILE);
+    E(MFILE);
+    E(FBIG);
+    E(NOSPC);
+    E(SPIPE);
+    E(ROFS);
+    E(NOSYS);
+    E(NAMETOOLONG);
+    default:
+        return GDB_EUNKNOWN;
+    }
+#undef E
+}
+
 /*
  * GDB Command Handlers
  */
diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c
index 578a08dfee8..bdc798a28cb 100644
--- a/target/m68k/m68k-semi.c
+++ b/target/m68k/m68k-semi.c
@@ -46,35 +46,6 @@
 #define HOSTED_ISATTY 12
 #define HOSTED_SYSTEM 13
 
-static int host_to_gdb_errno(int err)
-{
-#define E(X)  case E##X: return GDB_E##X
-    switch (err) {
-    E(PERM);
-    E(NOENT);
-    E(INTR);
-    E(BADF);
-    E(ACCES);
-    E(FAULT);
-    E(BUSY);
-    E(EXIST);
-    E(NODEV);
-    E(NOTDIR);
-    E(ISDIR);
-    E(INVAL);
-    E(NFILE);
-    E(MFILE);
-    E(FBIG);
-    E(NOSPC);
-    E(SPIPE);
-    E(ROFS);
-    E(NAMETOOLONG);
-    default:
-        return GDB_EUNKNOWN;
-    }
-#undef E
-}
-
 static void m68k_semi_u32_cb(CPUState *cs, uint64_t ret, int err)
 {
     CPUM68KState *env = cpu_env(cs);
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 09/11] gdbstub/user-target: Convert host errno to GDB File-I/O errno
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
                   ` (7 preceding siblings ...)
  2026-02-03 11:51 ` [PATCH 08/11] gdbstub: Export host_to_gdb_errno File-I/O helper function Alex Bennée
@ 2026-02-03 11:51 ` Alex Bennée
  2026-02-03 11:52 ` [PATCH 10/11] include/gdbstub: fix typo Alex Bennée
  2026-02-03 11:52 ` [PATCH 11/11] gdbstub/user: rename and use bool for running_state Alex Bennée
  10 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier, Yodel Eldar,
	Dominik 'Disconnect3d' Czarnota

From: Yodel Eldar <yodel.eldar@yodel.dev>

Use host_to_gdb_errno to convert host-supplied errnos to their GDB
File-I/O remote protocol values, and use them in F reply packets.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2751
Reported-by: Dominik 'Disconnect3d' Czarnota <dominik.b.czarnota@gmail.com>
Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260116014612.226183-4-yodel.eldar@yodel.dev>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 gdbstub/user-target.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/gdbstub/user-target.c b/gdbstub/user-target.c
index 43231e695e8..7ef0282f70e 100644
--- a/gdbstub/user-target.c
+++ b/gdbstub/user-target.c
@@ -10,6 +10,7 @@
 #include "qemu/osdep.h"
 #include "exec/gdbstub.h"
 #include "gdbstub/commands.h"
+#include "gdbstub/syscalls.h"
 #include "qemu.h"
 #include "internals.h"
 #ifdef CONFIG_LINUX
@@ -315,7 +316,8 @@ void gdb_handle_v_file_open(GArray *params, void *user_ctx)
     int fd = open(filename, flags, mode);
 #endif
     if (fd < 0) {
-        g_string_printf(gdbserver_state.str_buf, "F-1,%x", errno);
+        int gdb_errno = host_to_gdb_errno(errno);
+        g_string_printf(gdbserver_state.str_buf, "F-1,%x", gdb_errno);
     } else {
         g_string_printf(gdbserver_state.str_buf, "F%x", fd);
     }
@@ -327,7 +329,8 @@ void gdb_handle_v_file_close(GArray *params, void *user_ctx)
     int fd = gdb_get_cmd_param(params, 0)->val_ul;
 
     if (close(fd) == -1) {
-        g_string_printf(gdbserver_state.str_buf, "F-1,%x", errno);
+        int gdb_errno = host_to_gdb_errno(errno);
+        g_string_printf(gdbserver_state.str_buf, "F-1,%x", gdb_errno);
         gdb_put_strbuf();
         return;
     }
@@ -350,7 +353,8 @@ void gdb_handle_v_file_pread(GArray *params, void *user_ctx)
 
     ssize_t n = pread(fd, buf, bufsiz, offset);
     if (n < 0) {
-        g_string_printf(gdbserver_state.str_buf, "F-1,%x", errno);
+        int gdb_errno = host_to_gdb_errno(errno);
+        g_string_printf(gdbserver_state.str_buf, "F-1,%x", gdb_errno);
         gdb_put_strbuf();
         return;
     }
@@ -373,7 +377,8 @@ void gdb_handle_v_file_readlink(GArray *params, void *user_ctx)
     ssize_t n = readlink(filename, buf, BUFSIZ);
 #endif
     if (n < 0) {
-        g_string_printf(gdbserver_state.str_buf, "F-1,%x", errno);
+        int gdb_errno = host_to_gdb_errno(errno);
+        g_string_printf(gdbserver_state.str_buf, "F-1,%x", gdb_errno);
         gdb_put_strbuf();
         return;
     }
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 10/11] include/gdbstub: fix typo
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
                   ` (8 preceding siblings ...)
  2026-02-03 11:51 ` [PATCH 09/11] gdbstub/user-target: Convert host errno to GDB File-I/O errno Alex Bennée
@ 2026-02-03 11:52 ` Alex Bennée
  2026-02-03 12:06   ` Peter Maydell
  2026-02-03 11:52 ` [PATCH 11/11] gdbstub/user: rename and use bool for running_state Alex Bennée
  10 siblings, 1 reply; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/gdbstub/commands.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h
index bff3674872e..989a95c33f9 100644
--- a/include/gdbstub/commands.h
+++ b/include/gdbstub/commands.h
@@ -50,7 +50,7 @@ typedef union GdbCmdVariant {
  * '.' -> Skip 1 char unless reached "\0"
  * Any other value is treated as the delimiter value itself
  *
- * @allow_stop_reply: True iff the gdbstub can respond to this command with a
+ * @allow_stop_reply: True if the gdbstub can respond to this command with a
  * "stop reply" packet. The list of commands that accept such response is
  * defined at the GDB Remote Serial Protocol documentation. See:
  * https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html#Stop-Reply-Packets.
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 11/11] gdbstub/user: rename and use bool for running_state
  2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
                   ` (9 preceding siblings ...)
  2026-02-03 11:52 ` [PATCH 10/11] include/gdbstub: fix typo Alex Bennée
@ 2026-02-03 11:52 ` Alex Bennée
  2026-02-04  4:38   ` Richard Henderson
  10 siblings, 1 reply; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 11:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Alex Bennée, Peter Maydell,
	Cleber Rosa, Daniel P. Berrangé, Edgar E. Iglesias,
	qemu-s390x, Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

This is just a clean-up to document what we using the running variable
for in user-mode.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 gdbstub/user.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/gdbstub/user.c b/gdbstub/user.c
index a16f37616b1..97eb13e796a 100644
--- a/gdbstub/user.c
+++ b/gdbstub/user.c
@@ -87,7 +87,11 @@ enum GDBForkMessage {
 typedef struct {
     int fd;
     char *socket_path;
-    int running_state;
+    /*
+     * running state of the guest, when we process a packet that restarts
+     * the guest we set this to true.
+     */
+    bool running;
     /*
      * Store syscalls mask without memory allocation in order to avoid
      * implementing synchronization.
@@ -241,8 +245,8 @@ int gdb_handlesig(CPUState *cpu, int sig, const char *reason, void *siginfo,
 
     sig = 0;
     gdbserver_state.state = RS_IDLE;
-    gdbserver_user_state.running_state = 0;
-    while (gdbserver_user_state.running_state == 0) {
+    gdbserver_user_state.running = false;
+    while (!gdbserver_user_state.running) {
         char buf[256];
         int n = read(gdbserver_user_state.fd, buf, 256);
         if (n > 0) {
@@ -611,11 +615,11 @@ void gdbserver_fork_end(CPUState *cpu, pid_t pid)
 
     gdbserver_state.state = RS_IDLE;
     gdbserver_state.allow_stop_reply = false;
-    gdbserver_user_state.running_state = 0;
+    gdbserver_user_state.running = false;
     for (;;) {
         switch (gdbserver_user_state.fork_state) {
         case GDB_FORK_ENABLED:
-            if (gdbserver_user_state.running_state) {
+            if (gdbserver_user_state.running) {
                 close(fd);
                 return;
             }
@@ -728,7 +732,7 @@ void gdb_handle_query_attached(GArray *params, void *user_ctx)
 
 void gdb_continue(void)
 {
-    gdbserver_user_state.running_state = 1;
+    gdbserver_user_state.running = true;
     trace_gdbstub_op_continue();
 }
 
@@ -750,7 +754,7 @@ int gdb_continue_partial(char *newstates)
             cpu_single_step(cpu, gdbserver_state.sstep_flags);
         }
     }
-    gdbserver_user_state.running_state = 1;
+    gdbserver_user_state.running = true;
     return res;
 }
 
-- 
2.47.3



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 10/11] include/gdbstub: fix typo
  2026-02-03 11:52 ` [PATCH 10/11] include/gdbstub: fix typo Alex Bennée
@ 2026-02-03 12:06   ` Peter Maydell
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Maydell @ 2026-02-03 12:06 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-devel, John Snow, Pierrick Bouvier, qemu-arm,
	Markus Armbruster, Cédric Le Goater, David Gibson,
	Nicholas Piggin, Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Cleber Rosa, Daniel P. Berrangé,
	Edgar E. Iglesias, qemu-s390x, Thomas Huth, Paolo Bonzini,
	Akihiko Odaki, Daniel Henrique Barboza, David Hildenbrand,
	Ilya Leoshkevich, Richard Henderson, Laurent Vivier

On Tue, 3 Feb 2026 at 11:52, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  include/gdbstub/commands.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h
> index bff3674872e..989a95c33f9 100644
> --- a/include/gdbstub/commands.h
> +++ b/include/gdbstub/commands.h
> @@ -50,7 +50,7 @@ typedef union GdbCmdVariant {
>   * '.' -> Skip 1 char unless reached "\0"
>   * Any other value is treated as the delimiter value itself
>   *
> - * @allow_stop_reply: True iff the gdbstub can respond to this command with a
> + * @allow_stop_reply: True if the gdbstub can respond to this command with a
>   * "stop reply" packet. The list of commands that accept such response is
>   * defined at the GDB Remote Serial Protocol documentation. See:
>   * https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html#Stop-Reply-Packets.

"iff" is not generally a typo: it is an abbreviation for "if and only if".
We tend to prefer not to use that abbreviation, though, because
unless you happen to have a background in mathematics you probably
won't recognise it.

In this case I don't think spelling out "if and only if" brings
us any more clarity than using a plain "if", so I'm OK with the
change itself and we can just tweak the commit message.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 06/11] gdbstub: pass GString to gdb_build_stop_packet
  2026-02-03 11:51 ` [PATCH 06/11] gdbstub: pass GString to gdb_build_stop_packet Alex Bennée
@ 2026-02-03 15:44   ` Alex Bennée
  2026-02-04  4:37   ` Richard Henderson
  1 sibling, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2026-02-03 15:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Pierrick Bouvier, qemu-arm, Markus Armbruster,
	Cédric Le Goater, David Gibson, Nicholas Piggin,
	Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Peter Maydell, Cleber Rosa,
	Daniel P. Berrangé, Edgar E. Iglesias, qemu-s390x,
	Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

Alex Bennée <alex.bennee@linaro.org> writes:

> The other functions we are going to clean-up work variously with there

their...

> own dynamically allocated GStrings or with the common shared buffer.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  gdbstub/internals.h | 5 ++++-
>  gdbstub/gdbstub.c   | 4 ++--
>  gdbstub/system.c    | 4 ++--
>  gdbstub/user.c      | 8 ++++----
>  4 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/gdbstub/internals.h b/gdbstub/internals.h
> index 3134a6e8eb2..9b25bf58b8e 100644
> --- a/gdbstub/internals.h
> +++ b/gdbstub/internals.h
> @@ -239,9 +239,12 @@ int gdb_target_memory_rw_debug(CPUState *cs, hwaddr addr,
>  
>  /**
>   * gdb_build_stop_packet() - craft the stop packet
> + * @buf: GString buffer for building the packet
>   * @cs: CPUState
> + *
> + * Craft the Stop/Reply packet when we halt.
>   */
>  
> -void gdb_build_stop_packet(CPUState *cs);
> +void gdb_build_stop_packet(GString *buf, CPUState *cs);
>  
>  #endif /* GDBSTUB_INTERNALS_H */
> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
> index c82fb5ad324..b45eb7c7b2b 100644
> --- a/gdbstub/gdbstub.c
> +++ b/gdbstub/gdbstub.c
> @@ -1432,7 +1432,7 @@ static void handle_v_attach(GArray *params, void *user_ctx)
>          gdbserver_state.c_cpu = cpu;
>  
>          if (gdbserver_state.allow_stop_reply) {
> -            gdb_build_stop_packet(cpu);
> +            gdb_build_stop_packet(gdbserver_state.str_buf, cpu);
>              gdbserver_state.allow_stop_reply = false;
>          }
>      }
> @@ -2036,7 +2036,7 @@ static void handle_gen_set(GArray *params, void *user_ctx)
>  static void handle_target_halt(GArray *params, void *user_ctx)
>  {
>      if (gdbserver_state.allow_stop_reply) {
> -        gdb_build_stop_packet(gdbserver_state.c_cpu);
> +        gdb_build_stop_packet(gdbserver_state.str_buf, gdbserver_state.c_cpu);
>          gdbserver_state.allow_stop_reply = false;
>          gdb_put_strbuf();
>      }
> diff --git a/gdbstub/system.c b/gdbstub/system.c
> index 6963c930b01..8ec8b7ea336 100644
> --- a/gdbstub/system.c
> +++ b/gdbstub/system.c
> @@ -668,8 +668,8 @@ void gdb_breakpoint_remove_all(CPUState *cs)
>   *   T05core:{id};
>   */
>  
> -void gdb_build_stop_packet(CPUState *cs)
> +void gdb_build_stop_packet(GString *buf, CPUState *cs)
>  {
> -    g_string_printf(gdbserver_state.str_buf,
> +    g_string_printf(buf,
>                      "T%02xcore:%02x;", GDB_SIGNAL_TRAP, gdb_get_cpu_index(cs));
>  }
> diff --git a/gdbstub/user.c b/gdbstub/user.c
> index c7a3ef947ed..a16f37616b1 100644
> --- a/gdbstub/user.c
> +++ b/gdbstub/user.c
> @@ -976,9 +976,9 @@ void gdb_handle_query_xfer_siginfo(GArray *params, void *user_ctx)
>   *   T05thread:{id};
>   */
>  
> -void gdb_build_stop_packet(CPUState *cs)
> +void gdb_build_stop_packet(GString *buf, CPUState *cs)
>  {
> -    g_string_printf(gdbserver_state.str_buf, "T%02xthread:", GDB_SIGNAL_TRAP);
> -    gdb_append_thread_id(cs, gdbserver_state.str_buf);
> -    g_string_append_c(gdbserver_state.str_buf, ';');
> +    g_string_printf(buf, "T%02xthread:", GDB_SIGNAL_TRAP);
> +    gdb_append_thread_id(cs, buf);
> +    g_string_append_c(buf, ';');
>  }

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 03/11] gdbstub: remove the need for goto cleanup
  2026-02-03 11:51 ` [PATCH 03/11] gdbstub: remove the need for goto cleanup Alex Bennée
@ 2026-02-03 22:06   ` Yodel Eldar
  2026-02-03 22:14     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 20+ messages in thread
From: Yodel Eldar @ 2026-02-03 22:06 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-devel, John Snow, Pierrick Bouvier, qemu-arm,
	Markus Armbruster, Cédric Le Goater, David Gibson,
	Nicholas Piggin, Wainer dos Santos Moschetta, qemu-ppc,
	Philippe Mathieu-Daudé, Peter Maydell, Cleber Rosa,
	Daniel P. Berrangé, Edgar E. Iglesias, qemu-s390x,
	Thomas Huth, Paolo Bonzini, Akihiko Odaki,
	Daniel Henrique Barboza, David Hildenbrand, Ilya Leoshkevich,
	Richard Henderson, Laurent Vivier

Hi, Alex

On Tue, Feb 3, 2026 at 5:51 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> We already set a default error reply which we can only overwrite if we
> successfully follow the chain of checks. Initialise the variables as
> NULL and use that to gate the construction of the filled out
> stop/reply packet.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Thanks for the patch: glad to see a goto gone.

> ---
>  gdbstub/gdbstub.c | 30 +++++++++++++-----------------
>  1 file changed, 13 insertions(+), 17 deletions(-)
>
> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
> index 1f8cd118924..d4db7ba30cc 100644
> --- a/gdbstub/gdbstub.c
> +++ b/gdbstub/gdbstub.c
> @@ -1413,36 +1413,32 @@ static void handle_v_cont(GArray *params, void *user_ctx)
>
>  static void handle_v_attach(GArray *params, void *user_ctx)
>  {
> -    GDBProcess *process;
> -    CPUState *cpu;
> +    GDBProcess *process = NULL;
> +    CPUState *cpu = NULL;
>
> +    /* Default error reply */
>      g_string_assign(gdbserver_state.str_buf, "E22");
> -    if (!params->len) {
> -        goto cleanup;
> -    }
> -
> -    process = gdb_get_process(gdb_get_cmd_param(params, 0)->val_ul);
> -    if (!process) {
> -        goto cleanup;
> +    if (params->len) {
> +        process = gdb_get_process(gdb_get_cmd_param(params, 0)->val_ul);
>      }
>
> -    cpu = gdb_get_first_cpu_in_process(process);
> -    if (!cpu) {
> -        goto cleanup;
> +    if (process) {
> +        cpu = gdb_get_first_cpu_in_process(process);
>      }
>
> -    process->attached = true;
> -    gdbserver_state.g_cpu = cpu;
> -    gdbserver_state.c_cpu = cpu;
> +    if (cpu) {
> +        process->attached = true;
> +        gdbserver_state.g_cpu = cpu;
> +        gdbserver_state.c_cpu = cpu;
>
>      if (gdbserver_state.allow_stop_reply) {
>          g_string_printf(gdbserver_state.str_buf, "T%02xthread:", GDB_SIGNAL_TRAP);
>          gdb_append_thread_id(cpu, gdbserver_state.str_buf);
>          g_string_append_c(gdbserver_state.str_buf, ';');
>          gdbserver_state.allow_stop_reply = false;
> -cleanup:
> -        gdb_put_strbuf();
>      }
> +
> +    gdb_put_strbuf();
>  }
>

The `cpu` gated block doesn't have a closing brace here thereby breaking
build, but it does in the next patch. Maybe a `git add -p` gone awry?

Also, would it make sense to move the `cpu` and the to-be nested block
below it into the `process` gated block to avoid the `cpu` check
whenever `process` is NULL?

Yodel

>  static void handle_v_kill(GArray *params, void *user_ctx)
> --
> 2.47.3
>
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 03/11] gdbstub: remove the need for goto cleanup
  2026-02-03 22:06   ` Yodel Eldar
@ 2026-02-03 22:14     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-03 22:14 UTC (permalink / raw)
  To: Yodel Eldar, Alex Bennée
  Cc: qemu-devel, John Snow, Pierrick Bouvier, qemu-arm,
	Markus Armbruster, Cédric Le Goater, David Gibson,
	Nicholas Piggin, Wainer dos Santos Moschetta, qemu-ppc,
	Peter Maydell, Cleber Rosa, Daniel P. Berrangé,
	Edgar E. Iglesias, qemu-s390x, Thomas Huth, Paolo Bonzini,
	Akihiko Odaki, Daniel Henrique Barboza, David Hildenbrand,
	Ilya Leoshkevich, Richard Henderson, Laurent Vivier

On 3/2/26 23:06, Yodel Eldar wrote:
> Hi, Alex
> 
> On Tue, Feb 3, 2026 at 5:51 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> We already set a default error reply which we can only overwrite if we
>> successfully follow the chain of checks. Initialise the variables as
>> NULL and use that to gate the construction of the filled out
>> stop/reply packet.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> 
> Thanks for the patch: glad to see a goto gone.

It is not yet merged, but should be within the next 2 weeks now.

Thanks for your patience with this workflow!

>> ---
>>   gdbstub/gdbstub.c | 30 +++++++++++++-----------------
>>   1 file changed, 13 insertions(+), 17 deletions(-)


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 04/11] gdbstub: extract stop reply message construction
  2026-02-03 11:51 ` [PATCH 04/11] gdbstub: extract stop reply message construction Alex Bennée
@ 2026-02-04  4:29   ` Richard Henderson
  0 siblings, 0 replies; 20+ messages in thread
From: Richard Henderson @ 2026-02-04  4:29 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel

On 2/3/26 21:51, Alex Bennée wrote:
> The stop reply message we send can include a lot of extra information
> and a bunch is mode dependant. Extract the construction into a helper
> and add specialised versions for system and user mode.
> 
> The correct response for system mode should be of the form:
> 
>    T05core:N;
> 
> Where N is the core ID.
> 
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> ---
>   gdbstub/internals.h |  7 +++++++
>   gdbstub/gdbstub.c   | 15 ++++++---------
>   gdbstub/system.c    | 11 +++++++++++
>   gdbstub/user.c      | 12 ++++++++++++
>   4 files changed, 36 insertions(+), 9 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 05/11] gdbstub/user: localise variables for reading gdb socket
  2026-02-03 11:51 ` [PATCH 05/11] gdbstub/user: localise variables for reading gdb socket Alex Bennée
@ 2026-02-04  4:35   ` Richard Henderson
  0 siblings, 0 replies; 20+ messages in thread
From: Richard Henderson @ 2026-02-04  4:35 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel

On 2/3/26 21:51, Alex Bennée wrote:
> Keep things tidy by moving the declarations to the block where they
> are used.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   gdbstub/user.c | 10 +++-------
>   1 file changed, 3 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

> 
> diff --git a/gdbstub/user.c b/gdbstub/user.c
> index cc71cda3e33..c7a3ef947ed 100644
> --- a/gdbstub/user.c
> +++ b/gdbstub/user.c
> @@ -198,9 +198,6 @@ void gdb_qemu_exit(int code)
>   int gdb_handlesig(CPUState *cpu, int sig, const char *reason, void *siginfo,
>                     int siginfo_len)
>   {
> -    char buf[256];
> -    int n;
> -
>       if (!gdbserver_state.init || gdbserver_user_state.fd < 0) {
>           return sig;
>       }
> @@ -246,11 +243,10 @@ int gdb_handlesig(CPUState *cpu, int sig, const char *reason, void *siginfo,
>       gdbserver_state.state = RS_IDLE;
>       gdbserver_user_state.running_state = 0;
>       while (gdbserver_user_state.running_state == 0) {
> -        n = read(gdbserver_user_state.fd, buf, 256);
> +        char buf[256];
> +        int n = read(gdbserver_user_state.fd, buf, 256);
>           if (n > 0) {
> -            int i;
> -
> -            for (i = 0; i < n; i++) {
> +            for (int i = 0; i < n; i++) {
>                   gdb_read_byte(buf[i]);
>               }
>           } else {



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 06/11] gdbstub: pass GString to gdb_build_stop_packet
  2026-02-03 11:51 ` [PATCH 06/11] gdbstub: pass GString to gdb_build_stop_packet Alex Bennée
  2026-02-03 15:44   ` Alex Bennée
@ 2026-02-04  4:37   ` Richard Henderson
  1 sibling, 0 replies; 20+ messages in thread
From: Richard Henderson @ 2026-02-04  4:37 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel

On 2/3/26 21:51, Alex Bennée wrote:
> The other functions we are going to clean-up work variously with there
> own dynamically allocated GStrings or with the common shared buffer.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   gdbstub/internals.h | 5 ++++-
>   gdbstub/gdbstub.c   | 4 ++--
>   gdbstub/system.c    | 4 ++--
>   gdbstub/user.c      | 8 ++++----
>   4 files changed, 12 insertions(+), 9 deletions(-)

This function is brand new in patch 4.
Why not just merge these two patches?

Either way,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

> 
> diff --git a/gdbstub/internals.h b/gdbstub/internals.h
> index 3134a6e8eb2..9b25bf58b8e 100644
> --- a/gdbstub/internals.h
> +++ b/gdbstub/internals.h
> @@ -239,9 +239,12 @@ int gdb_target_memory_rw_debug(CPUState *cs, hwaddr addr,
>   
>   /**
>    * gdb_build_stop_packet() - craft the stop packet
> + * @buf: GString buffer for building the packet
>    * @cs: CPUState
> + *
> + * Craft the Stop/Reply packet when we halt.
>    */
>   
> -void gdb_build_stop_packet(CPUState *cs);
> +void gdb_build_stop_packet(GString *buf, CPUState *cs);
>   
>   #endif /* GDBSTUB_INTERNALS_H */
> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
> index c82fb5ad324..b45eb7c7b2b 100644
> --- a/gdbstub/gdbstub.c
> +++ b/gdbstub/gdbstub.c
> @@ -1432,7 +1432,7 @@ static void handle_v_attach(GArray *params, void *user_ctx)
>           gdbserver_state.c_cpu = cpu;
>   
>           if (gdbserver_state.allow_stop_reply) {
> -            gdb_build_stop_packet(cpu);
> +            gdb_build_stop_packet(gdbserver_state.str_buf, cpu);
>               gdbserver_state.allow_stop_reply = false;
>           }
>       }
> @@ -2036,7 +2036,7 @@ static void handle_gen_set(GArray *params, void *user_ctx)
>   static void handle_target_halt(GArray *params, void *user_ctx)
>   {
>       if (gdbserver_state.allow_stop_reply) {
> -        gdb_build_stop_packet(gdbserver_state.c_cpu);
> +        gdb_build_stop_packet(gdbserver_state.str_buf, gdbserver_state.c_cpu);
>           gdbserver_state.allow_stop_reply = false;
>           gdb_put_strbuf();
>       }
> diff --git a/gdbstub/system.c b/gdbstub/system.c
> index 6963c930b01..8ec8b7ea336 100644
> --- a/gdbstub/system.c
> +++ b/gdbstub/system.c
> @@ -668,8 +668,8 @@ void gdb_breakpoint_remove_all(CPUState *cs)
>    *   T05core:{id};
>    */
>   
> -void gdb_build_stop_packet(CPUState *cs)
> +void gdb_build_stop_packet(GString *buf, CPUState *cs)
>   {
> -    g_string_printf(gdbserver_state.str_buf,
> +    g_string_printf(buf,
>                       "T%02xcore:%02x;", GDB_SIGNAL_TRAP, gdb_get_cpu_index(cs));
>   }
> diff --git a/gdbstub/user.c b/gdbstub/user.c
> index c7a3ef947ed..a16f37616b1 100644
> --- a/gdbstub/user.c
> +++ b/gdbstub/user.c
> @@ -976,9 +976,9 @@ void gdb_handle_query_xfer_siginfo(GArray *params, void *user_ctx)
>    *   T05thread:{id};
>    */
>   
> -void gdb_build_stop_packet(CPUState *cs)
> +void gdb_build_stop_packet(GString *buf, CPUState *cs)
>   {
> -    g_string_printf(gdbserver_state.str_buf, "T%02xthread:", GDB_SIGNAL_TRAP);
> -    gdb_append_thread_id(cs, gdbserver_state.str_buf);
> -    g_string_append_c(gdbserver_state.str_buf, ';');
> +    g_string_printf(buf, "T%02xthread:", GDB_SIGNAL_TRAP);
> +    gdb_append_thread_id(cs, buf);
> +    g_string_append_c(buf, ';');
>   }



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 11/11] gdbstub/user: rename and use bool for running_state
  2026-02-03 11:52 ` [PATCH 11/11] gdbstub/user: rename and use bool for running_state Alex Bennée
@ 2026-02-04  4:38   ` Richard Henderson
  0 siblings, 0 replies; 20+ messages in thread
From: Richard Henderson @ 2026-02-04  4:38 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel

On 2/3/26 21:52, Alex Bennée wrote:
> This is just a clean-up to document what we using the running variable
> for in user-mode.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   gdbstub/user.c | 18 +++++++++++-------
>   1 file changed, 11 insertions(+), 7 deletions(-)



Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

> 
> diff --git a/gdbstub/user.c b/gdbstub/user.c
> index a16f37616b1..97eb13e796a 100644
> --- a/gdbstub/user.c
> +++ b/gdbstub/user.c
> @@ -87,7 +87,11 @@ enum GDBForkMessage {
>   typedef struct {
>       int fd;
>       char *socket_path;
> -    int running_state;
> +    /*
> +     * running state of the guest, when we process a packet that restarts
> +     * the guest we set this to true.
> +     */
> +    bool running;
>       /*
>        * Store syscalls mask without memory allocation in order to avoid
>        * implementing synchronization.
> @@ -241,8 +245,8 @@ int gdb_handlesig(CPUState *cpu, int sig, const char *reason, void *siginfo,
>   
>       sig = 0;
>       gdbserver_state.state = RS_IDLE;
> -    gdbserver_user_state.running_state = 0;
> -    while (gdbserver_user_state.running_state == 0) {
> +    gdbserver_user_state.running = false;
> +    while (!gdbserver_user_state.running) {
>           char buf[256];
>           int n = read(gdbserver_user_state.fd, buf, 256);
>           if (n > 0) {
> @@ -611,11 +615,11 @@ void gdbserver_fork_end(CPUState *cpu, pid_t pid)
>   
>       gdbserver_state.state = RS_IDLE;
>       gdbserver_state.allow_stop_reply = false;
> -    gdbserver_user_state.running_state = 0;
> +    gdbserver_user_state.running = false;
>       for (;;) {
>           switch (gdbserver_user_state.fork_state) {
>           case GDB_FORK_ENABLED:
> -            if (gdbserver_user_state.running_state) {
> +            if (gdbserver_user_state.running) {
>                   close(fd);
>                   return;
>               }
> @@ -728,7 +732,7 @@ void gdb_handle_query_attached(GArray *params, void *user_ctx)
>   
>   void gdb_continue(void)
>   {
> -    gdbserver_user_state.running_state = 1;
> +    gdbserver_user_state.running = true;
>       trace_gdbstub_op_continue();
>   }
>   
> @@ -750,7 +754,7 @@ int gdb_continue_partial(char *newstates)
>               cpu_single_step(cpu, gdbserver_state.sstep_flags);
>           }
>       }
> -    gdbserver_user_state.running_state = 1;
> +    gdbserver_user_state.running = true;
>       return res;
>   }
>   



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-02-04  4:39 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03 11:51 [PATCH 00/11] gdbstub/next - bug fixes and cleanups (pre-PR) Alex Bennée
2026-02-03 11:51 ` [PATCH 01/11] meson-buildoptions: Remove duplicated entry of --gdb in the help text Alex Bennée
2026-02-03 11:51 ` [PATCH 02/11] Makefile: add python script dependency for meson-buildoptions.sh Alex Bennée
2026-02-03 11:51 ` [PATCH 03/11] gdbstub: remove the need for goto cleanup Alex Bennée
2026-02-03 22:06   ` Yodel Eldar
2026-02-03 22:14     ` Philippe Mathieu-Daudé
2026-02-03 11:51 ` [PATCH 04/11] gdbstub: extract stop reply message construction Alex Bennée
2026-02-04  4:29   ` Richard Henderson
2026-02-03 11:51 ` [PATCH 05/11] gdbstub/user: localise variables for reading gdb socket Alex Bennée
2026-02-04  4:35   ` Richard Henderson
2026-02-03 11:51 ` [PATCH 06/11] gdbstub: pass GString to gdb_build_stop_packet Alex Bennée
2026-02-03 15:44   ` Alex Bennée
2026-02-04  4:37   ` Richard Henderson
2026-02-03 11:51 ` [PATCH 07/11] include/gdbstub/syscalls: Add EIO and ENOSYS GDB File-I/O errno values Alex Bennée
2026-02-03 11:51 ` [PATCH 08/11] gdbstub: Export host_to_gdb_errno File-I/O helper function Alex Bennée
2026-02-03 11:51 ` [PATCH 09/11] gdbstub/user-target: Convert host errno to GDB File-I/O errno Alex Bennée
2026-02-03 11:52 ` [PATCH 10/11] include/gdbstub: fix typo Alex Bennée
2026-02-03 12:06   ` Peter Maydell
2026-02-03 11:52 ` [PATCH 11/11] gdbstub/user: rename and use bool for running_state Alex Bennée
2026-02-04  4:38   ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.