Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] Windows gdb: Document "info threads" Windows specifics
Date: Thu, 7 May 2026 18:59:36 +0100	[thread overview]
Message-ID: <c58e0357-1f3f-4159-a69f-1bad4ba064ee@palves.net> (raw)
In-Reply-To: <865x53c7hf.fsf@gnu.org>

Hi Eli,

On 2026-05-04 20:14, Eli Zaretskii wrote:
>> From: Pedro Alves <pedro@palves.net>
>> +@smallexample
>> +(@value{GDBP}) info threads
>> +  Id   Target Id                            Frame
>> +  1    Thread 15648.0x4338                  main () at example.c:5
>> +  2    Thread 15648.0x3d58 (in syscall)     0x00007ffde37057b4 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:/WINDOWS/SYSTEM32/ntdll.dll
>> +* 3    Thread 15648.0x12d4 (in exception)   0x00007ffde00aa464 in KERNELBASE!CtrlRoutine () from C:/WINDOWS/System32/KERNELBASE.dll
>> +@end smallexample
> 
> Aren't these lines too long even for @smallexample?  Did you try
> generating PDF, and if so, did you get "overlong" warnings from TeX?

Indeed, I hadn't looked at the PDF.  I don't get "overlong" warnings, but the
example does not fit on a PDF page, and is cut on the right hand side.

I'd now trimmed as much as I could and wrapped the text in the "Frame" column.

Let me know if this looks OK to you this way.

> 
> Otherwise, this is okay.
> 
> Reviewed-By: Eli Zaretskii <eliz@gnu.org>
> 

From 8855c2fee69ce081cfc5efd3b5b8556a2b3a1317 Mon Sep 17 00:00:00 2001
From: Pedro Alves <pedro@palves.net>
Date: Mon, 4 May 2026 17:58:49 +0100
Subject: [PATCH 3/3] Windows gdb: Document "info threads" Windows specifics

Document "info threads" Windows specifics in the Windows debugging
features section.

Change-Id: I2123899bb8482381657ffbb4f0cc99f196526623
commit-id: 856225ce
---
 gdb/doc/gdb.texinfo | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index f132b8fee21..90f142335c3 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -25908,6 +25908,27 @@ 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}.
 
+The @code{info threads} command displays whether a thread stopped due
+to an exception or whether it stopped while running a system call.
+For example:
+
+@smallexample
+(@value{GDBP}) info threads
+  Id  Target Id                        Frame
+  1   Thread 123.0x338                 main () at example.c:5
+  2   Thread 123.0xd58 (in syscall)    0x00007ffde37057b4 in
+                                         ntdll!ZwWaitForWorkViaWorkerFactory ()
+                                         from C:/WINDOWS/SYSTEM32/ntdll.dll
+* 3   Thread 123.0x2d4 (in exception)  0x00007ffde00aa464 in
+                                         KERNELBASE!CtrlRoutine ()
+                                         from C:/WINDOWS/System32/KERNELBASE.dll
+@end smallexample
+
+Above we see that thread 2 is blocked inside a system call, thread 3
+stopped for an exception, and thread 1 simply stopped while running
+user space code.  Debug events such as breakpoint traps, single-steps,
+and @samp{Ctrl-C} interruptions are considered exceptions.
+
 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}.

base-commit: 8c0ac471835ec86a67c5b42713d9f138f31e4014
prerequisite-patch-id: 9cbfcc1f25d6c22749699faeb50c2f3ca4632c07
prerequisite-patch-id: 248f41871a76de97d95de3538d27298cdc9b68ce
-- 
2.53.0



  reply	other threads:[~2026-05-07 18:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 17:33 [PATCH 0/3] Show CONTEXT_EXCEPTION_REQUEST info in "info threads" Pedro Alves
2026-05-04 17:33 ` [PATCH 1/3] Windows gdb: " Pedro Alves
2026-05-04 19:12   ` Eli Zaretskii
2026-05-04 17:33 ` [PATCH 2/3] gdb manual: Cygwin => Windows Pedro Alves
2026-05-04 19:18   ` Eli Zaretskii
2026-05-07 17:42     ` Pedro Alves
2026-05-08 13:08       ` Eli Zaretskii
2026-05-04 17:33 ` [PATCH 3/3] Windows gdb: Document "info threads" Windows specifics Pedro Alves
2026-05-04 19:14   ` Eli Zaretskii
2026-05-07 17:59     ` Pedro Alves [this message]
2026-05-08 13:12       ` Eli Zaretskii

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=c58e0357-1f3f-4159-a69f-1bad4ba064ee@palves.net \
    --to=pedro@palves.net \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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