From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MXHcE6X8nGn38QcAWB0awg (envelope-from ) for ; Mon, 23 Feb 2026 20:19:33 -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=fz8FppzO; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4C0261E08D; Mon, 23 Feb 2026 20:19:33 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham 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 9BE831E08D for ; Mon, 23 Feb 2026 20:19:32 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 2D6054B9DB64 for ; Tue, 24 Feb 2026 01:19:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D6054B9DB64 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=fz8FppzO Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id F28B04B9DB6C for ; Tue, 24 Feb 2026 01:17:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F28B04B9DB6C 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 F28B04B9DB6C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771895822; cv=none; b=ksOjaKGlybh8gOdUsmzk3tgfnQ7pJTyO44i2VbLxeTMOm4k6jPQCvZpEmDTMpV30FWKzH7xHCzFNk33cEiRINf4OJE8a96FM9o/Z1w6CNghTq4hjKRA8bdF0bBztxkAF5yRzlqhWVLYYxqv/JhfuwZ0GrjwEQDDf6QgSKFb4lKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771895822; c=relaxed/simple; bh=vqmrB2DRO8aA9g5hOpJHSUyFk6yCjE/bpOKfrAE86xo=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=oZrOuPEPEoRui6ph5ntQl3WNGWruFT51Uo7Z/8iR1Jg89MjGhbqBD7rKAvylRkk5T/V3fOC79iMbHALAh0SdX424Oo2r9KnXFjXeFahF/+DDu9mOxXSHtGdy6aD/AgqIC41FkYy3LYNs756P/yjdeArBLzFMb8AwW88Ig0cc0bY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F28B04B9DB6C Received: from eig-obgw-6007b.ext.cloudfilter.net ([10.0.30.166]) by cmsmtp with ESMTPS id uWTmvKD1IKXDJuh2rvHdai; Tue, 24 Feb 2026 01:17:01 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id uh2pvMnNgh8QWuh2qvubfp; Tue, 24 Feb 2026 01:17:00 +0000 X-Authority-Analysis: v=2.4 cv=Mcdsu4/f c=1 sm=1 tr=0 ts=699cfc0c 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=mkCEreHqFvDI0DmR51cUeVlD1oyeXZg2kbPBBL0cvQw=; b=fz8FppzOAa8u/YZYwitCH64QNe FBgqFD0fkHoJu1bpfTPt+M+7Zj1EJNAIjoEVizlCiQHre+s+7rxk0sgZotEwL29uuD2rZaQiLNKl6 TsTB1wsxiL5gf7rjHu7gwDTeI; Received: from 97-122-122-234.hlrn.qwest.net ([97.122.122.234]:51428 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 1vuh2p-00000000sJg-3IOZ; Mon, 23 Feb 2026 18:16:59 -0700 From: Tom Tromey Date: Mon, 23 Feb 2026 18:17:01 -0700 Subject: [PATCH v4 8/8] Update .debug_names documentation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260223-dw-inline-fixup-pr-symtab-30728-2-v4-8-bf923dc5fb19@tromey.com> References: <20260223-dw-inline-fixup-pr-symtab-30728-2-v4-0-bf923dc5fb19@tromey.com> In-Reply-To: <20260223-dw-inline-fixup-pr-symtab-30728-2-v4-0-bf923dc5fb19@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: 1vuh2p-00000000sJg-3IOZ 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]:51428 X-Source-Auth: tom+tromey.com X-Email-Count: 11 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGLQKW0UuzSFZKFphrQTczanwDoK2b/3o2onaYXxU0ORkwRpQGC5fQNLDftJbHpHbm5X+a8jsjd0Cje0oRlo+QODKjq5MM4QEFymfeEquEgl/nWh6OBP P5seeOphOxLKHSKgNDx8g5hGfsOfxDrpAYEmu+iCQXknbirawke7efoAFVSmb9hMFn7Sd1zSamQvPbEvGYNGgUkmOXhqOTJhHZc= 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 3b2401117c7..86b0b8164fd 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -23313,6 +23313,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