From: Pedro Alves <pedro@palves.net>
To: Tom Tromey <tom@tromey.com>,
Mohamed Bouhaouel <mohamed.bouhaouel@intel.com>
Cc: gdb-patches@sourceware.org, markus.t.metzger@intel.com,
stephan.rohr@intel.com, eliz@gnu.org, aburgess@redhat.com
Subject: Re: [PATCH v4 00/11] Add AlwaysNonStop remote protocol extension
Date: Fri, 4 Sep 2026 19:54:38 +0100 [thread overview]
Message-ID: <42bc9fd0-1396-494e-b7af-a5af10a94172@palves.net> (raw)
In-Reply-To: <87jyp028ux.fsf@tromey.com>
On 2026-09-04 19:02, Tom Tromey wrote:
>>>>>> Mohamed Bouhaouel <mohamed.bouhaouel@intel.com> writes:
>
>> This series introduces the AlwaysNonStop extension, enabling remote
>> stubs to declare preferable non-stop mode operation. When advertised,
>> GDB defaults to non-stop mode. Attempts to disable it might be rejected
>> by the stub with a descriptive error message.
>
> One thing I don't see in the series is the motivation for this.
> It doesn't seem like something that would be useful to a user.
>
> And if a server wants to work in all-stop-on-top-of-non-stop mode,
> I don't think there's really anything preventing that; but also this
> wouldn't require any kind of protocol extension.
>
> I looked at this a little but I'm perhaps not the best person to review
> it. I can take a stab at some of it at some point; but I would like to
> understand the purpose.
>
FWIW, I discussed the design that led to this with Mohamed and others off-list,
and I do plan to review it once I'm able. I'll try to give it a shot next week.
The main purpose is that Intel's GPU support is designed as combining two
inferiors, one for the CPU side, and one for the GPU side. The CPU side
is a standard linux-nat target, which runs in all-stop-on-top-of-non-stop (AS-NS).
The GPU side is based on a remote gdbserver connection.
Combining a non-stop (native) with an all-stop (remote/gdbserver) target is
something that infrun is not really prepared for. So I've suggested that instead,
it'll be better if Intel's gdbserver always works in non-stop mode, too.
There is really currently no way for the server to tell GDB that it wants to work
in that way. Users would have to set "maint set target-non-stop on" manually.
AS-NS on the remote side has some user-visible advantages. The AS variant of the
protocol doesn't let you talk to the remote side until the target next stops, for
example. so no setting breakpoints, no reading global variables, etc., none of that is
possible while the target is running, while it is, in AS-NS. The main difference
is that vCont is asynchronous in the non-stop remote protocol. So ideally, we'd
switch over to that variant when we can, by default. But since there are
limitations (the ones I listed in the discussion of a previous revision of this series),
a remote target reporting that is supports non-stop mode, should not be taken as meaning
that it prefers to use non-stop mode by default. That's what the new extension gives us,
a way for the remote target to tell GDB what it wants.
I ran out of time this week, but I'll try to look at this soon. And of course, others
shouldn't be discouraged from looking just because I said I would. The more eyes,
the better.
Pedro Alves
next prev parent reply other threads:[~2026-09-04 18:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 9:21 Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 01/11] gdb, record: fix assertion when remote target is set to non-stop Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 02/11] gdb, remote: fix assertion on reconnect to non-stop target Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 03/11] gdb, remote: fix async handler " Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 04/11] gdb, remote: fix "info program" after " Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 05/11] gdb, remote: fix crash when accessing removed events Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 06/11] gdb, remote: fix ptid matching for process-wide stop events Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 07/11] gdb, dap: fix DAP events if no thread is selected Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 08/11] gdb, testsuite: handle async close in monitor-exit-quit.exp Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 09/11] gdb, testsuite: update attach-deleted-exec.exp to handle async messages Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 10/11] gdb, testsuite: add kfails for step-over-process-exit.exp Mohamed Bouhaouel
2026-07-14 9:21 ` [PATCH v4 11/11] gdb, gdbserver: add AlwaysNonStop remote protocol extension Mohamed Bouhaouel
2026-07-14 12:07 ` Eli Zaretskii
2026-09-04 18:02 ` [PATCH v4 00/11] Add " Tom Tromey
2026-09-04 18:54 ` Pedro Alves [this message]
2026-09-07 13:31 ` Bouhaouel, Mohamed
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=42bc9fd0-1396-494e-b7af-a5af10a94172@palves.net \
--to=pedro@palves.net \
--cc=aburgess@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=markus.t.metzger@intel.com \
--cc=mohamed.bouhaouel@intel.com \
--cc=stephan.rohr@intel.com \
--cc=tom@tromey.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