From: "Alex Bennée" <alex.bennee@linaro.org>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Cc: qemu-devel@nongnu.org, brian.cain@oss.qualcomm.com,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
marco.liebel@oss.qualcomm.com,
"Justin Sapp" <jsapp@qti.qualcomm.com>
Subject: Re: [PATCH] gdbstub: reset supported features on Supported request
Date: Wed, 04 Nov 2026 16:41:37 +0000 [thread overview]
Message-ID: <87v76c7dmm.fsf@draig.linaro.org> (raw)
In-Reply-To: <20261030222146.558366-1-pierrick.bouvier@oss.qualcomm.com> (Pierrick Bouvier's message of "Fri, 30 Oct 2026 15:21:46 -0700")
Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> writes:
> From: Justin Sapp <jsapp@qti.qualcomm.com>
>
> https://sourceware.org/gdb/current/onlinedocs/gdb.html/General-Query-Packets.html#qSupported
> ```
> Whenever the stub receives a ‘qSupported’ request, the supplied set
> of GDB features should override any previous request. This allows GDB to
> put the stub in a known state, even if the stub had previously been
> communicating with a different version of GDB.
> ```
>
> We exposed this by connecting to gdbstub using a gdb client first, and
> then WinDbg (EXDI) for windows kernel debugging. Since they both
> differ in their multiprocess support, this was confusing EXDI.
>
> While we are here, fix the same for fork_events in user mode.
>
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> ---
> gdbstub/gdbstub.c | 6 ++++++
> gdbstub/user.c | 1 +
> 2 files changed, 7 insertions(+)
>
> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
> index 0a328b0dd48..dbb2000c817 100644
> --- a/gdbstub/gdbstub.c
> +++ b/gdbstub/gdbstub.c
> @@ -1679,6 +1679,12 @@ void gdb_extend_qsupported_features(char *qflags)
>
> static void handle_query_supported(GArray *params, void *user_ctx)
> {
> + /*
> + * Reset multiprocess support as a new gdb client may have different support
> + * than a previous one.
> + */
> + gdbserver_state.multiprocess = false;
> +
This looks fine to me based on the commit write-up. Although it does
highlight that struct GDBState is due a clean-up to separate what is
negotiated features, temporary workspace and accelerator supported
features. Currently its just a random collection of stuff.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> g_string_printf(gdbserver_state.str_buf, "PacketSize=%x", MAX_PACKET_LENGTH);
> if (gdb_get_core_xml_file(first_cpu)) {
> g_string_append(gdbserver_state.str_buf, ";qXfer:features:read+");
> diff --git a/gdbstub/user.c b/gdbstub/user.c
> index d810f0f38c3..9b6d42d210a 100644
> --- a/gdbstub/user.c
> +++ b/gdbstub/user.c
> @@ -701,6 +701,7 @@ fail:
>
> void gdb_handle_query_supported_user(const char *gdb_supported)
> {
> + gdbserver_user_state.fork_events = false;
> if (strstr(gdb_supported, "fork-events+")) {
> gdbserver_user_state.fork_events = true;
> }
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2026-11-04 16:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 22:21 [PATCH] gdbstub: reset supported features on Supported request Pierrick Bouvier
2026-11-04 14:25 ` Pierrick Bouvier
2026-11-04 16:41 ` Alex Bennée [this message]
2026-11-04 19:09 ` Marco Liebel
2026-11-05 7:39 ` Pierrick Bouvier
2026-11-05 7:55 ` Pierrick Bouvier
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=87v76c7dmm.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=brian.cain@oss.qualcomm.com \
--cc=jsapp@qti.qualcomm.com \
--cc=marco.liebel@oss.qualcomm.com \
--cc=philmd@oss.qualcomm.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/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 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.