[2/3] gdb manual: Cygwin => Windows

Message ID 20260504173344.1278735-3-pedro@palves.net
State New
Headers
Series Show CONTEXT_EXCEPTION_REQUEST info in "info threads" |

Commit Message

Pedro Alves May 4, 2026, 5:33 p.m. UTC
  The Windows-specific commands are all documented in a section called
"Cygwin native", even though the information there also applies to
native/MinGW GDB.  This is most probably because GDB first had a
Cygwin port before it had a MinGW port, eons ago, and nobody updated
the manual.

This patch fixes it.

Change-Id: Id9788fe2a2c36f4482bd701478f4105df79513bc
commit-id:ebc5fee2
---
 gdb/doc/gdb.texinfo | 50 +++++++++++++++++++++++++++------------------
 1 file changed, 30 insertions(+), 20 deletions(-)
  

Comments

Eli Zaretskii May 4, 2026, 7:18 p.m. UTC | #1
> From: Pedro Alves <pedro@palves.net>
> Date: Mon,  4 May 2026 18:33:41 +0100
> 
> The Windows-specific commands are all documented in a section called
> "Cygwin native", even though the information there also applies to
> native/MinGW GDB.  This is most probably because GDB first had a
> Cygwin port before it had a MinGW port, eons ago, and nobody updated
> the manual.
> 
> This patch fixes it.
> 
> Change-Id: Id9788fe2a2c36f4482bd701478f4105df79513bc
> commit-id:ebc5fee2
> ---
>  gdb/doc/gdb.texinfo | 50 +++++++++++++++++++++++++++------------------
>  1 file changed, 30 insertions(+), 20 deletions(-)

Thanks.

> +The following commands are available in all native Windows
> +configurations, including Cygwin:

"Windows native" generally excludes Cygwin, because Cygwin uses a
different runtime.  So maybe instead of saying "all native Windows,
including Cygwin" we should say "all native Windows configuration, and
also Cygwin"?  If you agree with that, then the rest of the text you
added and the section name should also be amended.

> +In addition, the following commands are available on Cygwin:
                                           ^^^^^^^^^^^^^^^^^^^
You mean, "available only when debugging Cygwin programs"?

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
  
Pedro Alves May 7, 2026, 5:42 p.m. UTC | #2
Hi Eli,

On 2026-05-04 20:18, Eli Zaretskii wrote:
>> From: Pedro Alves <pedro@palves.net>> 
>> +The following commands are available in all native Windows
>> +configurations, including Cygwin:
> 
> "Windows native" generally excludes Cygwin, because Cygwin uses a
> different runtime.  

Indeed.

> So maybe instead of saying "all native Windows,
> including Cygwin" we should say "all native Windows configuration, and
> also Cygwin"?  If you agree with that, then the rest of the text you
> added and the section name should also be amended.
> 
>> +In addition, the following commands are available on Cygwin:
>                                            ^^^^^^^^^^^^^^^^^^^
> You mean, "available only when debugging Cygwin programs"?
> 
> Reviewed-By: Eli Zaretskii <eliz@gnu.org>
> 
How about this?  It splits the node in two, with cross links.


From aa5501f78061475c9dafd1220a0a8447f6b63913 Mon Sep 17 00:00:00 2001
From: Pedro Alves <pedro@palves.net>
Date: Mon, 4 May 2026 17:40:12 +0100
Subject: [PATCH] gdb manual: Cygwin => Windows

The Windows-specific commands are all documented in a section called
"Cygwin native", even though the information there also applies to
native/MinGW GDB.  This is most probably because GDB first had a
Cygwin port before it had a MinGW port, eons ago, and nobody updated
the manual.

This patch fixes it, by renaming the existing "Cygwin Native" node to
"Windows Native", and re-adding a new "Cygwin Native" node with the
Cygwin-specific features moved there.

Change-Id: Id9788fe2a2c36f4482bd701478f4105df79513bc
commit-id: ebc5fee2
---
 gdb/doc/gdb.texinfo | 59 +++++++++++++++++++++++++++++----------------
 1 file changed, 38 insertions(+), 21 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index ab0216ff477..f132b8fee21 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -25473,6 +25473,7 @@ configurations.
 * BSD libkvm Interface::        Debugging BSD kernel memory images
 * Process Information::         Process information
 * DJGPP Native::                Features specific to the DJGPP port
+* Windows Native::              Features specific to the Windows port
 * Cygwin Native::               Features specific to the Cygwin port
 * Hurd Native::                 Features specific to @sc{gnu} Hurd
 * Darwin::                      Features specific to Darwin
@@ -25886,15 +25887,18 @@ counts of various errors encountered so far.
 @end table
 
 
-@node Cygwin Native
+@node Windows Native
 @subsection Features for Debugging MS Windows PE Executables
 @cindex MS Windows debugging
-@cindex native Cygwin debugging
-@cindex Cygwin-specific commands
+@cindex native Windows debugging
+@cindex Windows-specific commands
 
 @value{GDBN} supports native debugging of MS Windows programs, including
 DLLs with and without symbolic debugging information.
 
+Unless explicitly stated, the following information is also applicable
+to Cygwin.  @xref{Cygwin Native}, for Cygwin-only features.
+
 @cindex Ctrl-BREAK, MS-Windows
 @cindex interrupt debuggee on MS-Windows
 MS-Windows programs that call @code{SetConsoleMode} to switch off the
@@ -25904,7 +25908,7 @@ supports @kbd{C-@key{BREAK}} as an alternative interrupt key
 sequence, which can be used to interrupt the debuggee even if it
 ignores @kbd{C-c}.
 
-There are various additional Cygwin-specific commands, described in
+There are various additional Windows-specific commands, described in
 this section.  Working with DLLs that have no debugging symbols is
 described in @ref{Non-debug DLL Symbols}.
 
@@ -25956,23 +25960,6 @@ automatically, @code{0} will cause a dialog box with ``OK'' and
 terminate the crashing process (OK) or debug it (Cancel).
 @end itemize
 
-@kindex set cygwin-exceptions
-@cindex debugging the Cygwin DLL
-@cindex Cygwin DLL, debugging
-@item set cygwin-exceptions @var{mode}
-If @var{mode} is @code{on}, @value{GDBN} will break on exceptions that
-happen inside the Cygwin DLL.  If @var{mode} is @code{off},
-@value{GDBN} will delay recognition of exceptions, and may ignore some
-exceptions which seem to be caused by internal Cygwin DLL
-``bookkeeping''.  This option is meant primarily for debugging the
-Cygwin DLL itself; the default value is @code{off} to avoid annoying
-@value{GDBN} users with false @code{SIGSEGV} signals.
-
-@kindex show cygwin-exceptions
-@item show cygwin-exceptions
-Displays whether @value{GDBN} will break on exceptions that happen
-inside the Cygwin DLL itself.
-
 @kindex set new-console
 @item set new-console @var{mode}
 If @var{mode} is @code{on} the debuggee will
@@ -26019,6 +26006,36 @@ debuggee seen by the debugger.
 This boolean value adds debug output concerning debuggee memory reads
 and writes by the debugger.
 
+@end table
+
+@node Cygwin Native
+@subsection Features for Debugging Cygwin Programs
+@cindex native Cygwin debugging
+@cindex Cygwin-specific commands
+
+As Cygwin runs on Windows, the features described in @ref{Windows
+Native} section are also applicable to Cygwin.
+
+In addition, the following commands are available on Cygwin:
+
+@table @code
+@kindex set cygwin-exceptions
+@cindex debugging the Cygwin DLL
+@cindex Cygwin DLL, debugging
+@item set cygwin-exceptions @var{mode}
+If @var{mode} is @code{on}, @value{GDBN} will break on exceptions that
+happen inside the Cygwin DLL.  If @var{mode} is @code{off},
+@value{GDBN} will delay recognition of exceptions, and may ignore some
+exceptions which seem to be caused by internal Cygwin DLL
+``bookkeeping''.  This option is meant primarily for debugging the
+Cygwin DLL itself; the default value is @code{off} to avoid annoying
+@value{GDBN} users with false @code{SIGSEGV} signals.
+
+@kindex show cygwin-exceptions
+@item show cygwin-exceptions
+Displays whether @value{GDBN} will break on exceptions that happen
+inside the Cygwin DLL itself.
+
 @kindex set shell
 @item set shell
 This boolean values specifies whether the debuggee is called

base-commit: 8c0ac471835ec86a67c5b42713d9f138f31e4014
prerequisite-patch-id: 9cbfcc1f25d6c22749699faeb50c2f3ca4632c07
  
Eli Zaretskii May 8, 2026, 1:08 p.m. UTC | #3
> Date: Thu, 7 May 2026 18:42:27 +0100
> Cc: gdb-patches@sourceware.org
> From: Pedro Alves <pedro@palves.net>
> 
> On 2026-05-04 20:18, Eli Zaretskii wrote:
> >> From: Pedro Alves <pedro@palves.net>> 
> >> +The following commands are available in all native Windows
> >> +configurations, including Cygwin:
> > 
> > "Windows native" generally excludes Cygwin, because Cygwin uses a
> > different runtime.  
> 
> Indeed.
> 
> > So maybe instead of saying "all native Windows,
> > including Cygwin" we should say "all native Windows configuration, and
> > also Cygwin"?  If you agree with that, then the rest of the text you
> > added and the section name should also be amended.
> > 
> >> +In addition, the following commands are available on Cygwin:
> >                                            ^^^^^^^^^^^^^^^^^^^
> > You mean, "available only when debugging Cygwin programs"?
> > 
> > Reviewed-By: Eli Zaretskii <eliz@gnu.org>
> > 
> How about this?  It splits the node in two, with cross links.

LGTM, thanks.
  

Patch

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index ab0216ff477..29d959e68f7 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -25473,7 +25473,7 @@  configurations.
 * BSD libkvm Interface::        Debugging BSD kernel memory images
 * Process Information::         Process information
 * DJGPP Native::                Features specific to the DJGPP port
-* Cygwin Native::               Features specific to the Cygwin port
+* Windows Native::              Features specific to the Windows port
 * Hurd Native::                 Features specific to @sc{gnu} Hurd
 * Darwin::                      Features specific to Darwin
 * FreeBSD::                     Features specific to FreeBSD
@@ -25886,10 +25886,11 @@  counts of various errors encountered so far.
 @end table
 
 
-@node Cygwin Native
+@node Windows Native
 @subsection Features for Debugging MS Windows PE Executables
 @cindex MS Windows debugging
 @cindex native Cygwin debugging
+@cindex Windows-specific commands
 @cindex Cygwin-specific commands
 
 @value{GDBN} supports native debugging of MS Windows programs, including
@@ -25904,10 +25905,13 @@  supports @kbd{C-@key{BREAK}} as an alternative interrupt key
 sequence, which can be used to interrupt the debuggee even if it
 ignores @kbd{C-c}.
 
-There are various additional Cygwin-specific commands, described in
+There are various additional Windows-specific commands, described in
 this section.  Working with DLLs that have no debugging symbols is
 described in @ref{Non-debug DLL Symbols}.
 
+The following commands are available in all native Windows
+configurations, including Cygwin:
+
 @table @code
 @kindex info w32
 @item info w32
@@ -25956,23 +25960,6 @@  automatically, @code{0} will cause a dialog box with ``OK'' and
 terminate the crashing process (OK) or debug it (Cancel).
 @end itemize
 
-@kindex set cygwin-exceptions
-@cindex debugging the Cygwin DLL
-@cindex Cygwin DLL, debugging
-@item set cygwin-exceptions @var{mode}
-If @var{mode} is @code{on}, @value{GDBN} will break on exceptions that
-happen inside the Cygwin DLL.  If @var{mode} is @code{off},
-@value{GDBN} will delay recognition of exceptions, and may ignore some
-exceptions which seem to be caused by internal Cygwin DLL
-``bookkeeping''.  This option is meant primarily for debugging the
-Cygwin DLL itself; the default value is @code{off} to avoid annoying
-@value{GDBN} users with false @code{SIGSEGV} signals.
-
-@kindex show cygwin-exceptions
-@item show cygwin-exceptions
-Displays whether @value{GDBN} will break on exceptions that happen
-inside the Cygwin DLL itself.
-
 @kindex set new-console
 @item set new-console @var{mode}
 If @var{mode} is @code{on} the debuggee will
@@ -26019,6 +26006,29 @@  debuggee seen by the debugger.
 This boolean value adds debug output concerning debuggee memory reads
 and writes by the debugger.
 
+@end table
+
+@sp 1
+In addition, the following commands are available on Cygwin:
+
+@table @code
+@kindex set cygwin-exceptions
+@cindex debugging the Cygwin DLL
+@cindex Cygwin DLL, debugging
+@item set cygwin-exceptions @var{mode}
+If @var{mode} is @code{on}, @value{GDBN} will break on exceptions that
+happen inside the Cygwin DLL.  If @var{mode} is @code{off},
+@value{GDBN} will delay recognition of exceptions, and may ignore some
+exceptions which seem to be caused by internal Cygwin DLL
+``bookkeeping''.  This option is meant primarily for debugging the
+Cygwin DLL itself; the default value is @code{off} to avoid annoying
+@value{GDBN} users with false @code{SIGSEGV} signals.
+
+@kindex show cygwin-exceptions
+@item show cygwin-exceptions
+Displays whether @value{GDBN} will break on exceptions that happen
+inside the Cygwin DLL itself.
+
 @kindex set shell
 @item set shell
 This boolean values specifies whether the debuggee is called