From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +R7eBbOMi2kFGTQAWB0awg (envelope-from ) for ; Tue, 10 Feb 2026 14:53:23 -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=JqeuEMIA; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0ADEE1E0BA; Tue, 10 Feb 2026 14:53:23 -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 24D9D1E08D for ; Tue, 10 Feb 2026 14:53:22 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id A9EE54BA23C0 for ; Tue, 10 Feb 2026 19:53:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9EE54BA23C0 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=JqeuEMIA Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id A3BFE4BA23C3 for ; Tue, 10 Feb 2026 19:52:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3BFE4BA23C3 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 A3BFE4BA23C3 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770753159; cv=none; b=tKlJ8ti13bMK9c6gvvSJJ1oJvz0W8/v8WjiVyyr55wU2Zdi63Am33dTibmafLIvc48LP4lNpm98dQfMDMwEmLM+K7LmIesSRSdDrWULZlRNv3g6ZtQD1Ipos0Af3cBy1nTmLyIGK740dAl1Jzj7ByUaBObR45s4Xr87J2S7La8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770753159; c=relaxed/simple; bh=FG4LeXNlxe3WC0U86GYNXNa1TGG6WbYacf95I0ouqmc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rkLPhhIKI1WQISdSnb22RwwxaLxCf8ED+Jlt0XEzJ/7SsMfqAK/5Ug6kU6JpT5kdZDYhV7Xprk366fLFg/+QPV58hCCNuD19YEF7uG7w3zL/xacA5SyxyId2cCTH4hCdHivfvzTYsfaIMVF3GdMCTzcSWqB7t2mxt39SPCBxC0I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3BFE4BA23C3 Received: from eig-obgw-6002b.ext.cloudfilter.net ([10.0.30.203]) by cmsmtp with ESMTPS id psxwvAQmUipkCptmovf12s; Tue, 10 Feb 2026 19:52:38 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id ptmovj7qwPL32ptmovaWA7; Tue, 10 Feb 2026 19:52:38 +0000 X-Authority-Analysis: v=2.4 cv=MqhS63ae c=1 sm=1 tr=0 ts=698b8c86 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=HzLeVaNsDn8A:10 a=ItBw4LHWJt0A:10 a=dzWzf_mpAAAA:8 a=7nfjp1CedpztjtmsC1oA:9 a=b4DR9a7p2ZdsqdHBznES:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: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=/faitIO9y5x0TPoT2pAY4pxhG2bz0SHFdAHvavhCfXM=; b=JqeuEMIAuTi/RoxjQR59gfVNS8 KN+gjndiqUFAYhPhKIrTHoBPdhhNpvHCC5JV8166GK9mUueuxKA3tfz/jkW2U25SrGAtkNQgEPE3a x1p1da64YVj+sURpIXZMbqHjm; Received: from 97-118-49-200.hlrn.qwest.net ([97.118.49.200]:33714 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vptmn-00000001UYJ-3hCV; Tue, 10 Feb 2026 12:52:37 -0700 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v2 8/8] Update .debug_names documentation In-Reply-To: (Simon Marchi's message of "Tue, 10 Feb 2026 12:03:58 -0500") References: <20260126-dw-inline-fixup-pr-symtab-30728-2-v2-0-8ab183d1911c@tromey.com> <20260126-dw-inline-fixup-pr-symtab-30728-2-v2-8-8ab183d1911c@tromey.com> <87zf5gvamk.fsf@tromey.com> X-Attribution: Tom Date: Tue, 10 Feb 2026 12:52:36 -0700 Message-ID: <87ikc41im3.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain 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.118.49.200 X-Source-L: No X-Exim-ID: 1vptmn-00000001UYJ-3hCV X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-118-49-200.hlrn.qwest.net (bapiya) [97.118.49.200]:33714 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfO2aXIz1oEn2vG0VQnq6TWVY2RqMK2a3wj2ElXXXN0rlkUcShbTazrI9hE7CNkrTRyDF89orBQhMrAAKvaQFvhQyWxYQWFGyEEZWUjwJWuagaNlBUvKA nRzhT49FiQpes/x2qbKvl0Huj0ZNz3tMlvCDrlcK2z+7odk0FnyfoDTHLpQr/q8z5aC02vGga64LtKg5uiT4gQ1Z/YrXD0pA1io= 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 >>>>> "Simon" == Simon Marchi writes: >> For a variable to be shared in a PU, either it will just be a >> declaration and each including CU will have a separate definition that >> refers to it; or alternatively every such variable will have the same >> address. But in the latter case they are the same variable. Simon> You can't have a DW_TAG_variable in a PU that will represent a definition Simon> in all the included CUs? For instance, if you have Simon> static const char *my_var; Simon> inside a C header file included by many C source files. And then, in Simon> the DWARF, we "factor out" that DW_TAG_variable into a PU that is Simon> "DW_TAG_imported_unit"-imported by many CUs. In that case, wouldn't we Simon> have a my_var definition in all CUs? This approach would make a different variable in each CU. They would all share a name but have different addresses. So while it's possible to share some of this in a PU (like, the name, type, and source location), each CU would still end up with a separate DIE describing the address. Simon> Ok, so a use case for this would be: the user types "break Simon> my_inlined_func", and then you want to find all CUs where Simon> my_inlined_func is defined (even through a PU), to find all the inline Simon> sites, to put breakpoints on all of them? Yes. That's the failure addressed by the series. >> BTW the DWARF approach to inline functions will also hamper incremental >> CU expansion (if we ever get there). At the very least when finding an >> inline function gdb will have to scan all DIEs in the CUs just in case. Simon> That's a bummer, I hope we can find a way around this. Since the reader pre-loads all the DIEs I am thinking it probably won't be super expensive to also iterate over them. Or alternatively we could have the DIE-loading process notice all the spots where an inlined function is seen. Tom