Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <pedro@palves.net>
Cc: ssbssa@yahoo.de, gdb-patches@sourceware.org
Subject: Re: [PATCH] Clarify "maint set target-non-stop" in GDB manual (Re: [PATCH v3 00/11] Windows non-stop mode)
Date: Thu, 30 Apr 2026 18:09:15 +0300	[thread overview]
Message-ID: <86o6j032p0.fsf@gnu.org> (raw)
In-Reply-To: <9164005f-57fe-4027-8cf8-d7bd396a9812@palves.net> (message from Pedro Alves on Thu, 30 Apr 2026 15:15:42 +0100)

> Date: Thu, 30 Apr 2026 15:15:42 +0100
> From: Pedro Alves <pedro@palves.net>
> Cc: ssbssa@yahoo.de, gdb-patches@sourceware.org
> 
> > OK, I can take a look at this.
> 
> How about this below?
> 
> Note I added a note saying that this isn't useful to users, but note that the maint commands appendix already starts with:
> 
>   "In addition to commands intended for GDB users, GDB includes a number of commands intended for GDB developers, that are not documented elsewhere in this manual. 

Thanks.

> +The following @code{set non-stop off} combinations are valid:

Shouldn't it also say something about "set non-stop on"?

> +@table @code
> +@item @code{set non-stop off}, target operating in all-stop mode
> +When a @value{GDBN} target is operating in all-stop mode, then when
> +a thread hits a breakpoint, finishes a step, etc., the target stops
> +all threads, and reports the event to the infrun module in the core of
> +@value{GDBN}.  If infrun decides the stop is not to be seen by the
> +user, infrun re-resumes all threads again.  In other words, all
> +threads stop and are re-resumed for every debug event, even for debug
> +events that are internal and do not cause a user-visible stop.
> +
> +@item @code{set non-stop off}, target operating in non-stop mode
> +When a @value{GDBN} target is operating in non-stop mode in
> +combination with @code{set non-stop} set to @code{off}, it is said
> +that @value{GDBN} is operating in ``all-stop on top of non-stop''.  In
> +this scenario, when a thread hits a breakpoint, finishes a step, etc.,
> +the target does not immediately stop all other threads.  If, while
> +processing the event, infrun decides the stop should be reported to
> +the user, it then explicitly stops all threads, just before presenting
> +the stop to the user; otherwise, infrun re-resumes the stopped thread.
> +@end table

The second @item says "...in combination with @code{set non-stop} set
to @code{off}", which is a Good Thing, but the first @item doesn't say
the same about the "on" setting.  I suggest to make the style more
consistent.

Also, what about the description of "set non-stop", the user-level
command?  It currently doesn't even say what is the default.  In
addition, the fact that its description says "Enable selection of
non-stop mode" is confusing, because it makes it sound like there's
some other command to actually "select" the non-stop mode.  The text
which attempts to explain the "enable" part, viz.:

     Note these commands only reflect whether non-stop mode is enabled,
  not whether the currently-executing program is being run in non-stop
  mode.  In particular, the 'set non-stop' preference is only consulted
  when GDB starts or connects to the target program, and it is generally
  not possible to switch modes once debugging has started.  Furthermore,
  since not all targets support non-stop mode, even when you have enabled
  non-stop mode, GDB may still fall back to all-stop operation by default.

doesn't really justify the "enable" part.  It won't surprise anyone
that "set non-stop on" will only work if the target doesn't support
it, and the fact that this command only affects the next inferior to
be started is just a factoid to be mentioned, but it again doesn't
justify the "enable" confusion, IMO.

  reply	other threads:[~2026-04-30 15:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 20:14 [PATCH v3 00/11] Windows non-stop mode 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
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 [this message]
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=86o6j032p0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    --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