| Message ID | 20260504173344.1278735-4-pedro@palves.net |
|---|---|
| State | New |
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id A1A6C4BAD173 for <patchwork@sourceware.org>; Mon, 4 May 2026 17:34:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A1A6C4BAD173 X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by sourceware.org (Postfix) with ESMTPS id 658BC4BAE7DB for <gdb-patches@sourceware.org>; Mon, 4 May 2026 17:33:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 658BC4BAE7DB 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 658BC4BAE7DB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777916037; cv=none; b=BPb/Vgd61wbxvd9oXP/yi63lWpxsqXJwY46W8XxFXGp3tGnt+E4660XOw+tb2vDab6PBOCr0yyvraYxes45CsFifgkYpE2QB5zW3iN/vyTVCL0+Jr+0KlFVNUFsEbO949MaENU7Zmygv7AjZS8XBmga6ZNWZzcMteMpJd/rGpR8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777916037; c=relaxed/simple; bh=RdZKOkeF1wIqr4T7a5SzJyWZnaI45P8wyVrXoZ2F+C0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=dVqaoh7f4tdtQuosC5Yp1TbRGBWVkbg0t1OKfyZO2qBzt6y0fAj/2rCW1/7TMsRQN1KNK3cJKTqt79PZPX8xUNX3rrS7qTGKBEGziqkzYBVGmA65VA/Afb2AwE4EdtdfLdUQqT8aAUstrmlCEj1gcXaJN4LdIo9Lz2kcsDo11Uw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 658BC4BAE7DB Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-488d2079582so46998815e9.2 for <gdb-patches@sourceware.org>; Mon, 04 May 2026 10:33:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777916036; x=1778520836; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=oXTijiN9GZwYsb04qsfES4bkhfD1wQC6cUXQ3S2NUwY=; b=PN+gmuG69vPFwlQv3/dCJPjryj4fAdm9JTbWVwSivfzxfjmEjLt3JXwj4Gfvi5sPNz nX9qEQ/jWymCC+8JdxCSwsM8okq1I+EWXy/3zaaqqh7+Rz1t19Brd9OLyzRkasUbEUsH RhmPcrwVC1GrLQp+gU5ithf/evb1s4soLPjq+Z+YKn7Kmyyo+TSzO7UJEHMcvutNuqtn CmImJU+aO3a+W9eWqKCrpUtbvZQ5SxoRbpu1UKBxmNoDXf/PeWa69IQMROpie8MlL7NI TJv/NiTUcOqft02Otn+Q8jQVOMW3OrAAHYfm/Hzwl7UntGTQrdJdd2h74HG4JeBq6R8r E2dQ== X-Gm-Message-State: AOJu0YyND5i5VT05DzVddO3Ej6Q+G78afBwsKp9NNufnmkS2MoACfQXN tkuNZ2H1vQjOs3bQEAQSkPfA9j0lxClehXTGjb58qh5kwHxVbMP5hdzVuskhsQ== X-Gm-Gg: AeBDiesUytKjEedplpCx/hqKnI/+QSdrJp5rJtW27IyyZZT0nVoh1Cctn03gnWbpYry vp7Txr71p4JScSivh+E3pXtqN8qfwWJhlkQI+TKIBFwe15pUOseVdZ3j/FyazTHSrkIC7NWCS1E RPiC1hbSJ8tTg6oyNOmz6mhGMJ1z3w5Xc3Dp3JC4fT9LzWyh6yT8+TjBUKFGSCE+nDROuWOv+3D ACWezT2uTSKV5YjEInturvgfXk7EWjtaH3sU1BZpZIkmivO9fJQy8z7h6H6Jg7IjUGYhm94ontD Nhfffy24ilRcYJa5H+g0KlUANZe94P2zsBb+v3jHfJP4jfI8JDHBlZ/Vuur+dUscYYeGJJmaiEj yMWJgdt4Br7J75LSqc1eBEv4WD5s4WWNZnvvJ2xV5VJDMYffuSfJHdwuiS+4dormLaFh9EY2jIm iXTOjZt/oKRmZP/bOMKdKzh4QpLf1IJr6n X-Received: by 2002:a5d:4d0d:0:b0:44d:261:54c5 with SMTP id ffacd0b85a97d-44d026154e5mr9801908f8f.30.1777916035854; Mon, 04 May 2026 10:33:55 -0700 (PDT) Received: from localhost ([2001:8a0:facb:a800:f625:f0b7:9de7:360b]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-44a8ef50e59sm26694675f8f.10.2026.05.04.10.33.55 for <gdb-patches@sourceware.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 May 2026 10:33:55 -0700 (PDT) From: Pedro Alves <pedro@palves.net> To: gdb-patches@sourceware.org Subject: [PATCH 3/3] Windows gdb: Document "info threads" Windows specifics Date: Mon, 4 May 2026 18:33:42 +0100 Message-ID: <20260504173344.1278735-4-pedro@palves.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260504173344.1278735-1-pedro@palves.net> References: <20260504173344.1278735-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
Show CONTEXT_EXCEPTION_REQUEST info in "info threads"
|
|
Commit Message
Pedro Alves
May 4, 2026, 5:33 p.m. UTC
Document "info threads" Windows specifics in the Windows debugging features section. Change-Id: I2123899bb8482381657ffbb4f0cc99f196526623 commit-id:856225ce --- gdb/doc/gdb.texinfo | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
Comments
> From: Pedro Alves <pedro@palves.net> > Date: Mon, 4 May 2026 18:33:42 +0100 > > Document "info threads" Windows specifics in the Windows debugging > features section. > > Change-Id: I2123899bb8482381657ffbb4f0cc99f196526623 > commit-id:856225ce > --- > gdb/doc/gdb.texinfo | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) Thanks. > +@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? Otherwise, this is okay. Reviewed-By: Eli Zaretskii <eliz@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
> Date: Thu, 7 May 2026 18:59:36 +0100 > Cc: gdb-patches@sourceware.org > From: Pedro Alves <pedro@palves.net> > > 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. This looks OK, thanks.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 29d959e68f7..318299fdd3d 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -25905,6 +25905,23 @@ 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 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 + +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}.