From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mWolNwvImGklMAMAWB0awg (envelope-from ) for ; Fri, 20 Feb 2026 15:46:03 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=JLeq54Mk; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DBEFF1E0BA; Fri, 20 Feb 2026 15:46:03 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no 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 3E8A91E08D for ; Fri, 20 Feb 2026 15:46:03 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id D56B14BA23CB for ; Fri, 20 Feb 2026 20:46:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D56B14BA23CB Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=JLeq54Mk Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 7943C4BA23F8 for ; Fri, 20 Feb 2026 20:42:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7943C4BA23F8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7943C4BA23F8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771620147; cv=none; b=ZSVlqECTrEwx0ByYcwWQYwzgbPFEsUxs5d6+xrf/HDFYCKZIjGyigH6SPNTB3j0FVcyTCUm2FQUdjJcl98jDYgjmdw379yCDXLJP2HUjEAnv4Py+t3fg0j7OZIDwdKPALYcvGPTMmcQif1oWGehV4vz5kOwzRoC7FSroo5zkZeE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771620147; c=relaxed/simple; bh=vypib4TKTyANgXdPzFHLF+VIIxCrkUd+1udbD+SYnLY=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=nvu+JPNy21KcFbgoeEd/dROz6/Z6rDXKktQN3QZXnaoPc6ryopNGDRHG4RT5zqBUy3j9JArVI3T+TsR4oHjlikAr4o64B6jZ20fswy52EWEB2t87WA+MoqAhYmC1Mx8c3tDqHDIB6m7UOM6LZYwc6MfRmzYpDO1Qm7h6fmfdj/g= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7943C4BA23F8 Received: from eig-obgw-6007b.ext.cloudfilter.net ([10.0.30.166]) by cmsmtp with ESMTPS id tQs9vrwDDCxrGtXKUv5F1z; Fri, 20 Feb 2026 20:42:27 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id tXKTvPJkAh8QWtXKUv9SZf; Fri, 20 Feb 2026 20:42:26 +0000 X-Authority-Analysis: v=2.4 cv=Mcdsu4/f c=1 sm=1 tr=0 ts=6998c732 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=ItBw4LHWJt0A:10 a=mDV3o1hIAAAA:8 a=-bHnBbIfGeP9n9-2nn0A:9 a=QEXdDO2ut3YA:10 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uSiXkAQwkLUql9HkGFuueJLx4aoFDDqA2VXBa9mqmXA=; b=JLeq54MkSMRv76v4EJ3sgNmiX2 GMdY1pZxxVTqX8Z3ujyNL1c2ZO7PEm04YHVEb4ABm6jClnvsOFzV8NL3HqCQzcG4FzNjuVn7ysFjL tbMredzA58YeYLueXQKNx8nJ0; Received: from 97-122-122-234.hlrn.qwest.net ([97.122.122.234]:49908 helo=[192.168.122.1]) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vtXKT-00000000Jtq-336g; Fri, 20 Feb 2026 13:42:25 -0700 From: Tom Tromey Date: Fri, 20 Feb 2026 13:42:28 -0700 Subject: [PATCH v3 8/8] Update .debug_names documentation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260220-dw-inline-fixup-pr-symtab-30728-2-v3-8-98ae8ab28fab@tromey.com> References: <20260220-dw-inline-fixup-pr-symtab-30728-2-v3-0-98ae8ab28fab@tromey.com> In-Reply-To: <20260220-dw-inline-fixup-pr-symtab-30728-2-v3-0-98ae8ab28fab@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey , Eli Zaretskii X-Mailer: b4 0.14.3 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.122.234 X-Source-L: No X-Exim-ID: 1vtXKT-00000000Jtq-336g X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-122-234.hlrn.qwest.net ([192.168.122.1]) [97.122.122.234]:49908 X-Source-Auth: tom+tromey.com X-Email-Count: 13 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfCENgUqA32gFHLlza8dpci79H+/T2r25OHVB5uLo3ZnLdjiDSsoL0+HRKs3wJLk8RAR7iwwlGYbjaTiQ0A3utg0VuveBdC4yFvCwEPCHK1hRjgmhg9c9 cx56sOS1ozp4GKahk9lT+wVo/4GiMTxtzt/D2V7ic+z+tb6ik0heQS84mkLQ6ZxgA2CcnIud+iNh20u4vb5hv7/n088vrt71a0o= 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 This updates the .debug_names documentation to explain some DWARF issues that we've handled in gdb. This list still isn't exhaustive. I think there are some situations where gdb may examine a declaration (which DWARF says not to do), but I didn't document this as I don't recall the details. Approved-By: Eli Zaretskii --- gdb/doc/gdb.texinfo | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 5b99c2b2e23..5e89724c72a 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -23311,6 +23311,43 @@ source name. @end table +@value{GDBN} also has some special handling for cases not considered +in the DWARF specification. + +@itemize @bullet +@item +The @code{DW_IDX_parent} for a C-style enumerator does not point at +the entry for @code{enum} itself, but rather the parent of the type. +The reason for this is that C-style enumerators are injected into the +containing scope, and so their name is not qualified by the +@code{enum}; and furthermore there is no way to distinguish between +C-style enumerators and @code{enum class}-style enumerators in +@samp{.debug_names}. + +@item +Similarly, @code{DW_IDX_parent} is omitted for any linkage name +entries that are written. + +@item +Definitions in partial units are handled differently. These most +typically are seen in the output of @code{dwz}. + +In general, a DWARF partial unit cannot be read in isolation, but only +by reading it in the context of some other unit that references it via +@code{DW_TAG_imported_unit}. + +Therefore, an ordinary definition in a partial unit is attributed to +one of the outermost containing units. This is done by referencing +this containing CU in the @code{DW_IDX_compile_unit} attribute. + +A further special case applies to @code{DW_TAG_inlined_subroutine} +entries. An inlined subroutine appearing in a partial unit may be +inlined in all of the outermost compilation units that directly or +indirectly include the partial unit. Therefore, in this case, +@value{GDBN} will emit a separate index entry for the entry, once for +each such containing unit. +@end itemize + @node Symbol Errors @section Errors Reading Symbol Files -- 2.49.0