From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Js1SLzFk82mcXgYAWB0awg (envelope-from ) for ; Thu, 30 Apr 2026 10:16:17 -0400 Received: by simark.ca (Postfix, from userid 112) id A5D741E0BA; Thu, 30 Apr 2026 10:16:17 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B73721E067 for ; Thu, 30 Apr 2026 10:16:16 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id D3E96436F3DE for ; Thu, 30 Apr 2026 14:16:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3E96436F3DE Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by sourceware.org (Postfix) with ESMTPS id 800324BB58A5 for ; Thu, 30 Apr 2026 14:15:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 800324BB58A5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 800324BB58A5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777558548; cv=none; b=kZwo0eMlk/+MOAj3DgfIBejaDB7PX+jMU20/bu9RTsmz39m95n8twuFCssnfFmTIS7um1grjx9YwbwKzzmBTUSwi+Jh1rwgqu2Ci4/xySCxuxT93CFn2n87vbpASQ/3ofK1ca/YbkIWKv/YEbqpEM/ZydJH2p1OK2oDCEcoODvU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777558548; c=relaxed/simple; bh=V8gPrBI03+F+KEDvlxnuTt2OTFxBs5YZSM7+8GdWZ30=; h=Message-ID:Date:MIME-Version:Subject:From:To; b=ow7MgV5Gb/TWSzY+G2RAnI3rrjBysAzi2ASZAB+rIS9CMv5+y2iorgwBC0+BvhWFmHBS9EC2DZyxJYKxLbTDrHDI8+H7WH/j5Wz9UYHCp0WLY+JIXod/6R+s9UPPLHkLd8IAyHIZ2jA3MnLN2DvUG07gcrt6RGydZm2tNrYElo8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 800324BB58A5 Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-488b0e1b870so16511935e9.2 for ; Thu, 30 Apr 2026 07:15:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777558547; x=1778163347; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JDJuU4eaOs8yX+1I3Qa5yn6wWMy+xyRanzlB+va7ZQE=; b=jOmCwxc7PUbfAqMuRo6lWqOrtifmf6PQzxydlmlaoI/bItP0O3Q/9+tOJE4Lsorr88 YHbtSWM2lCSVlxAo2ezm5zXKTuAZhSXIGDc5pNzVFb7ZoUQh0V6VJzaPCCsfcX0ZvMpD +6VKHj1HQCfpV8VnV+YrOJoYy8k07qx/S/8ynGYq/hH9kq+vzYv9e7Lno/cOxtcSK+Ma wmH/Kbmf1E6EYRJ5Uq2JMhJ//FCiQo3bJHV4kbs5uO0hbRROpO5Ki+XmpSBMTh0ng+Hb uoTe8gBlPjSb4SGMIi4olmW+UYVGoDrp3fRdkUxbBfUnX0edFzB5X69VT4Ke1eV1ffrk uBgg== X-Forwarded-Encrypted: i=1; AFNElJ+8JqzdKR44+ivYV9SBOoQ6xRV/DbCUipKzIUl6qdrWhOAtcI6y7Ar/hGTMjWs0uYMWKdGgWs7c0gfjtw==@sourceware.org X-Gm-Message-State: AOJu0YxNZT+FeMFo2M13+cEpoTxv30km0SZEufVddjcH8FtnwoffC4LD jB9DmQW/QWMxyU/ceeqwLDHovvWct0MfHQkGGEns3Vb7gVpmsXNikioW X-Gm-Gg: AeBDiet7lKAt9CDfOmLjkpMzbcs10MaOOhc+b6suPX9MkTeDACv057Mw5Mq5ddkASyl SP4NzSe1sQnf7ZgZp8yuV3EL5YrAyaOHnM6dbAxdmUct016JZwNMRVxrERLzVxrNZ+iW4KbeDLA Cex60hJ921xpNb7iD8neeh1ol+DLwt0RNmHgt6dGoR6BGI0nM2w6H8j/iUcRKNizieMX8lP6q06 3RFKR1CIzkABx/jnkeR4W40VVjHpsyrPDUTjgs+JlDCDh17rMVe/2M9+O2rN/CkK954j6OMpdhd cOZyG4zud3mN91KU+3wG4vEpi43y+b/lBqXbYah6zt+LU+pZW43mvEOELt/y1S1E7vAFHJL6sRh p/LPmjZrnf1eV0xUpft9/pyr5RY5Gcl1ViSYT3MZrUMT2ZN8GA5R8w6RNwYx2z5Lf5Rvtrazs5l L1oIeMVu80d56ovgG632MPclv7VDJTJq/LLGJnirzqhzbDh9/L6sx1Xln+6A8IGAOZxllowho1l R5w X-Received: by 2002:a05:600c:3552:b0:485:4eaf:eb53 with SMTP id 5b1f17b1804b1-48a8447a734mr54655185e9.19.1777558547030; Thu, 30 Apr 2026 07:15:47 -0700 (PDT) Received: from ?IPV6:2001:8a0:facb:a800:7184:b702:c4f3:bfd3? ([2001:8a0:facb:a800:7184:b702:c4f3:bfd3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a7c317336sm43154295e9.26.2026.04.30.07.15.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Apr 2026 07:15:45 -0700 (PDT) Message-ID: <9164005f-57fe-4027-8cf8-d7bd396a9812@palves.net> Date: Thu, 30 Apr 2026 15:15:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH] Clarify "maint set target-non-stop" in GDB manual (Re: [PATCH v3 00/11] Windows non-stop mode) From: Pedro Alves To: Eli Zaretskii Cc: ssbssa@yahoo.de, gdb-patches@sourceware.org References: <20260429201507.480870-1-pedro@palves.net> <86a4ul3sbb.fsf@gnu.org> <601b9ddc-382c-42ce-82c0-c01d3266021a@palves.net> <86wlxo3dkf.fsf@gnu.org> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 2026-04-30 13:01, Pedro Alves wrote: > On 2026-04-30 12:14, Eli Zaretskii wrote: >> >> I think we should clarify the text in the manual, and in particular we >> should not use "operate in non-stop mode" for describing both the >> user-level "set non-stop on" and the maint command. I would also >> welcome some wording in the description of the maint command to >> clearly indicate that this setting is of no interest to users >> whatsoever, only to GDB developers who work on this mode. Explaining >> "backend" (not currently described anywhere in the manual AFAICT) >> would also be welcome, as it seems to be relevant for this particular >> issue, and could be used in the manual to clarify this. > > 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. >From 897071189f4acf94b6e01e32bc10f2c036181b42 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 30 Apr 2026 13:12:10 +0100 Subject: [PATCH] Clarify "maint set target-non-stop" in GDB manual This provides the following improvements to the GDB user manual, where we document "maint set target-non-stop": - Clarifies "maint set target-non-stop" vs "set non-stop" . - Corrects the "auto" description to current reality. - Gives a couple examples of what "GDB targets" are. - Documents the "all-stop on top of non-stop" term. Change-Id: Ia720e5091dd57321fb19e6a306678b834ab822df commit-id:dbc519ee --- gdb/doc/gdb.texinfo | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 82306072e8c..f6b9436f841 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -42907,15 +42907,22 @@ to more easily debug problems occurring only in synchronous mode. @item maint set target-non-stop @itemx maint show target-non-stop -This controls whether @value{GDBN} targets always operate in non-stop -mode even if @code{set non-stop} is @code{off} (@pxref{Non-Stop -Mode}). The default is @code{auto}, meaning non-stop mode is enabled -if supported by the target. +This controls whether @value{GDBN} targets (e.g., the native target, +or a remote target) operate in non-stop mode even if @code{set +non-stop} is @code{off} (@pxref{Non-Stop Mode}). The default is +@code{auto}. + +This affects @value{GDBN} internal operation and is largely invisible +to users. Normally users should not need to change this setting, but +it can be changed to more easily debug problems occurring only in a +specific mode. @table @code @item maint set target-non-stop auto This is the default mode. @value{GDBN} controls the target in -non-stop mode if the target supports it. +non-stop mode if @code{set non-stop} is @code{on}, or the target tells +infrun that it wants to operate in non-stop mode even with @code{set +non-stop} is set to @code{off}. @item maint set target-non-stop on @value{GDBN} controls the target in non-stop mode even if the target @@ -42926,6 +42933,32 @@ does not indicate support. target supports it. @end table +The following @code{set non-stop off} combinations are valid: + +@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 + +@code{set non-stop on} requires the target operating in non-stop mode; +it is not compatible with the target operating in all-stop mode. + @kindex maint set tui-resize-message @kindex maint show tui-resize-message @item maint set tui-resize-message base-commit: bc145a24033381e93bae0ee24add664386c66433 -- 2.53.0