From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +Q+ECgHed2kIrRYAWB0awg (envelope-from ) for ; Mon, 26 Jan 2026 16:34:57 -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=IncNCA1G; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2551E1E0DD; Mon, 26 Jan 2026 16:34:57 -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 9282B1E089 for ; Mon, 26 Jan 2026 16:34:56 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id DD9CE4BC895E for ; Mon, 26 Jan 2026 21:34:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD9CE4BC895E 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=IncNCA1G Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id 410174BC7ED2 for ; Mon, 26 Jan 2026 21:33:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 410174BC7ED2 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 410174BC7ED2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769463212; cv=none; b=RSWDhUs4+0bSxh/jIUPUTKaZgrr8HUNVAQJgr44qvj/ZbEIFz7y1o+WG+bPDzzmcQgBOB3O/o/xYY+DRbuEJSr75izo723edYWOgTENNDc2vZmRR1EuC6JhiIy8dzSeZMKe7LuwTdP2FEbjXE8TwsNXZxEpwvdi6BFkLeC8iNWg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769463212; c=relaxed/simple; bh=vWedu6eGTukdrJfhTci+YVMULr9Ob5OK/2BW26GjOZ4=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=xgLMbBwH4LUVZPTT1iClnBOEqVJZr9HIok6VorDhFGLYqHPfDAEK8903mlAgwPBwJWVIMPeLeCvP0xE9DHXzmku4Hs2I3jE0sayecR3k3iU5Hsd4WJfEg8OFoXUgC3RfwFuf+pHLfPYnsZV+PGYF5teG4aXvBgjqaFkFLYMwE/I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 410174BC7ED2 Received: from eig-obgw-6004b.ext.cloudfilter.net ([10.0.30.210]) by cmsmtp with ESMTPS id kR3WvRi2RVCBNkUDDvyval; Mon, 26 Jan 2026 21:33:31 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id kUDCvpGwFK8vzkUDCvSE0e; Mon, 26 Jan 2026 21:33:31 +0000 X-Authority-Analysis: v=2.4 cv=cJDgskeN c=1 sm=1 tr=0 ts=6977ddab a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=ItBw4LHWJt0A:10 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=nnZQxRZDkmnxMyP/Ew6YsShuPgsvxyHrQvHDVlNqOP4=; b=IncNCA1GCY5WO7U1Ti7chTf0uq LOEMUmRuT0WSvHIysefo9JdgvX7c8/b9ZMsyBCOkrz8G190ZVkOuhFDbc9qJgzRM3kvnnYcnd8H7L wzkQDhr+smS+3WqVSnm7FSSYL; Received: from 97-122-114-32.hlrn.qwest.net ([97.122.114.32]:44294 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 1vkUDC-00000003cBe-2MbD; Mon, 26 Jan 2026 14:33:30 -0700 From: Tom Tromey Date: Mon, 26 Jan 2026 14:33:10 -0700 Subject: [PATCH v2 8/8] Update .debug_names documentation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260126-dw-inline-fixup-pr-symtab-30728-2-v2-8-8ab183d1911c@tromey.com> References: <20260126-dw-inline-fixup-pr-symtab-30728-2-v2-0-8ab183d1911c@tromey.com> In-Reply-To: <20260126-dw-inline-fixup-pr-symtab-30728-2-v2-0-8ab183d1911c@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey 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.114.32 X-Source-L: No X-Exim-ID: 1vkUDC-00000003cBe-2MbD X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-114-32.hlrn.qwest.net ([192.168.122.1]) [97.122.114.32]:44294 X-Source-Auth: tom+tromey.com X-Email-Count: 9 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfNaiirYEeNpwK9ODSE2BtGM/dNtGIMBkTyx6+wPz9yfCVEVein4k6cH0fhT4CVmFd6ZTrTXXLKx0IuzhinReNS5NRLLCh2wQ17fEUsGCj56FStE+odbQ 69bCdmawjyjvKlT2wYQr+hxVuq1XFL0AP6cc4eDHjrjDeibGFOoKI1+SkIyrdMkd17L15ynxtp3EdsoiILyk+i5RZbQpqaQy6Js= 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. --- gdb/doc/gdb.texinfo | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 80f49e21b7e..1b3813286e6 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -23297,6 +23297,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