From: Pedro Alves <pedro@palves.net>
To: Eli Zaretskii <eliz@gnu.org>, Hannes Domani <ssbssa@yahoo.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 00/11] Windows non-stop mode
Date: Thu, 30 Apr 2026 11:13:55 +0100 [thread overview]
Message-ID: <601b9ddc-382c-42ce-82c0-c01d3266021a@palves.net> (raw)
In-Reply-To: <86a4ul3sbb.fsf@gnu.org>
Hi Eli,
On 2026-04-30 06:55, Eli Zaretskii wrote:
>> From: Pedro Alves <pedro@palves.net>
>> After the series, the Windows target backend defaults to working in
>> non-stop mode (as in, "maint set target-non-stop"), even if
>> user-visible mode is all-stop ("set non-stop off"). This is the same
>> as the Linux backend.
>
> I'm not sure this is necessarily a good idea. Windows is weird in
> this aspect, as you know very well: the system frequently starts
> additional threads for its own purposes, such as handling the Ctrl-C
> and Ctrl-BREAK signals. Also, many Windows programs have a separate
> UI thread which receives and dispatches the Windows GUI messages.
> Letting those threads run by default when the program stops at a
> breakpoint is not necessarily the best alternative, and perhaps is
> best left to the GDB user in each case (they can do that in
> program-specific .gdbinit, if they need). Or am I missing something?
What I meant by the above, is that the windows target backend code defaults to
working in non-stop mode, but the user does not see any difference. When a
breakpoint is hit, GDB still stops all threads. For the user, it still works the
same, "set non-stop off" is still the default and I don't plan to change that.
The "maint set target-non-stop" setting is just for how the backend communicates
with infrun. I call this "all-stop on top of non-stop". Short for
"(user-visible) all-stop on top of (backend working in) non-stop (mode)".
This is how the Linux backend works too.
When the backend works in non-stop mode (the "maint set target-non-stop" setting),
infrun takes responsibility for explicitly stopping all threads when necessary,
instead of the backend implicitly stopping all threads for every reported
internal debug event. It gives more flexibility to infrun, and is a requirement
for enabling supporting AMD GPU debugging on Windows. The user doesn't see
anything different.
Pedro Alves
next prev parent reply other threads:[~2026-04-30 10:14 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 20:14 Pedro Alves
2026-04-29 20:14 ` [PATCH v3 01/11] Windows gdb+gdbserver: Check whether DBG_REPLY_LATER is available Pedro Alves
2026-04-29 20:14 ` [PATCH v3 02/11] linux-nat: Factor out get_detach_signal code to common code Pedro Alves
2026-04-29 20:14 ` [PATCH v3 03/11] Windows GDB: make windows_thread_info be private thread_info data Pedro Alves
2026-04-29 20:15 ` [PATCH v3 04/11] Introduce windows_nat::event_code_to_string Pedro Alves
2026-04-29 20:15 ` [PATCH v3 05/11] Windows gdb: Add non-stop support Pedro Alves
2026-04-29 20:15 ` [PATCH v3 06/11] Windows gdb: Watchpoints while running (internal vs external stops) Pedro Alves
2026-04-29 20:15 ` [PATCH v3 07/11] Windows gdb: extra thread info => show exiting Pedro Alves
2026-04-29 20:15 ` [PATCH v3 08/11] Add gdb.threads/leader-exit-schedlock.exp Pedro Alves
2026-04-29 20:15 ` [PATCH v3 09/11] infrun: with AS+NS, prefer process exit over thread exit Pedro Alves
2026-05-06 10:01 ` Bouhaouel, Mohamed
2026-05-08 21:37 ` Pedro Alves
2026-05-11 11:58 ` Bouhaouel, Mohamed
2026-04-29 20:15 ` [PATCH v3 10/11] Windows gdb: Always non-stop (default to "maint set target-non-stop on") Pedro Alves
2026-04-29 20:15 ` [PATCH v3 11/11] Mention Windows non-stop support in NEWS Pedro Alves
2026-04-30 5:55 ` [PATCH v3 00/11] Windows non-stop mode Eli Zaretskii
2026-04-30 10:13 ` Pedro Alves [this message]
2026-04-30 11:14 ` Eli Zaretskii
2026-04-30 12:01 ` Pedro Alves
2026-04-30 14:15 ` [PATCH] Clarify "maint set target-non-stop" in GDB manual (Re: [PATCH v3 00/11] Windows non-stop mode) Pedro Alves
2026-04-30 15:09 ` Eli Zaretskii
2026-04-30 16:18 ` [PATCH v2] " Pedro Alves
2026-04-30 16:27 ` Eli Zaretskii
2026-04-30 16:33 ` Pedro Alves
2026-04-30 17:45 ` [PATCH v3 00/11] Windows non-stop mode Pedro Alves
2026-05-08 18:43 ` Tom Tromey
2026-05-08 21:27 ` Pedro Alves
2026-05-22 0:22 ` Pedro Alves
2026-06-02 19:00 ` Tom Tromey
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=601b9ddc-382c-42ce-82c0-c01d3266021a@palves.net \
--to=pedro@palves.net \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.de \
/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