From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CddcKDBUpGrUKgEAWB0awg (envelope-from ) for ; Fri, 11 Sep 2026 15:19:12 -0400 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=KkaCLPfb; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9F6471E09E; Fri, 11 Sep 2026 15:19:12 -0400 (EDT) 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 EC1A01E033 for ; Fri, 11 Sep 2026 15:19:11 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 78AA948FBCA9 for ; Fri, 11 Sep 2026 19:19:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78AA948FBCA9 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=KkaCLPfb Received: from omta40.uswest2.a.cloudfilter.net (omta40.uswest2.a.cloudfilter.net [35.89.44.39]) by sourceware.org (Postfix) with ESMTPS id D49454BC057D for ; Fri, 11 Sep 2026 19:18:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D49454BC057D 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 D49454BC057D Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789154326; cv=none; b=Eqm/1po7jbBOG/FQOMXUyikhpNnyq7Iv0hXSRa3FbIwBR3tMBxkzAh0/IRNZAKhcnoUq4a7cZ9hZfyKF+wlgz8W3gzfCyaXDevfDwiwEyntw9LI6rjy/Z3EkcpJqwHn3QQ5DkW24pBi6ZIHz7mkQtO5UusxQBAjjinyen8VoVRo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789154326; c=relaxed/simple; bh=YGyPe0kbwth8HICLtB2HBq38G2+TBCdmTAvTXLYMNhs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=M4fGJq0Pmw5EuChtzemaPbZyJXo6OqpCc/trQZP6z2ahpYx22cDycQODrou8FKDLIXD3Z1wLH+K0fz7jHqcCMbqhuLY5z4pBUcb5lDgiVj2xiiVsyiBHuwhpSRLUer8+UwHiKvG3Jl7cyQeoBxiP9ys0y7Kj+zBPSmS9eWT1bKA= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=KkaCLPfb reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D49454BC057D Received: from eig-obgw-5007b.ext.cloudfilter.net ([10.0.29.167]) by cmsmtp with ESMTPS id 56Tkx9uTVc3Xs56loxhrUj; Fri, 11 Sep 2026 19:18:44 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 56lmxPrhzbQ0n56lnxB4yx; Fri, 11 Sep 2026 19:18:43 +0000 X-Authority-Analysis: v=2.4 cv=S4XZwJsP c=1 sm=1 tr=0 ts=6aa45413 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=VdqzKS8jKosA:10 a=ItBw4LHWJt0A:10 a=dzWzf_mpAAAA:8 a=zfFOBmjB7cik3Sy7fysA: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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yNr0AOQzuTCnw3qPCY2jLRLvZtjgNwWwlmXZC0G1pdw=; b=KkaCLPfb2KpRa+owBpsqdySuSL v1XCu3Ri0SBl/HzNoyP/WJC4A2G8lRwOoMd41JrK/GkWlMIZq7LQYUbjHUOeWab5ysDowMCydortC SK1nQXOPFVRzQ45fBzUu0ACrz; Received: from 97-122-117-2.hlrn.qwest.net ([97.122.117.2]:47556 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100) (envelope-from ) id 1x56lm-00000002jat-1Xzx; Fri, 11 Sep 2026 13:18:42 -0600 From: Tom Tromey To: Simon Marchi Cc: Andrew Burgess , gdb-patches@sourceware.org Subject: Re: [PATCHv3] gdb: resolve class name via DW_AT_signature in cooked index In-Reply-To: <1a67b29f-e2f1-480a-ae2b-e0d0d5acfdca@simark.ca> (Simon Marchi's message of "Thu, 10 Sep 2026 12:11:05 -0400") References: <295672ce0ea0bf20911fbbc997f38fe9f62b19be.1787952498.git.aburgess@redhat.com> <897f5eb957bdfd90cd3fd5efa662021ed5c2aef2.1788269262.git.aburgess@redhat.com> <1a67b29f-e2f1-480a-ae2b-e0d0d5acfdca@simark.ca> X-Attribution: Tom Date: Fri, 11 Sep 2026 13:18:24 -0600 Message-ID: <874ifvy4u7.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.122.117.2 X-Source-L: No X-Exim-ID: 1x56lm-00000002jat-1Xzx X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-117-2.hlrn.qwest.net (bapiya) [97.122.117.2]:47556 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfLEalC7GkVcTH+2mZJ2iGUAza070CZTPPGPoDxiWrIM2j3pxcxKR+64LF3N3nEoU+MoTwpDnvIJQMWy4dr5SKaG384FjR01pJc20hxsj2MNhIlioqP/9 GRivE0PUZHaahagEukuKaVLzssBtZn0cFO/bkYrMaY8WUFKaixB2OBU+cr3n4SanB5zRbtF9WJs9dfCVL92xRiH7lIDoVQ9+u9A= 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: >> (a) If a DIE has no name, but does have a signature, then give the >> DIE a fake name (the empty string), and create an index entry >> for the DIE. Also keep a record that the cooked_index_entry >> for this DIE has a deferred name. Simon> Just wondering, if we end up not patching the entry for some reason, Simon> will an entry with an empty name cause problems / match things it's not Simon> supposed to match? Like will the child of that nameless entry be Simon> considered to be part of the top-level namespace or something like that? Simon> If it happens that we have an entry with an unresolved name, perhaps we Simon> should consider this entry invalid and just skip anything that would Simon> require it. Simon> So yeah, I wonder if it wouldn't be better to leave the name as Simon> nullptr, that would force us to add some nullptr checks to realize Simon> that the entry doesn't have a valid name, and we would skip it. I would much prefer a new cooked_index_flag_enum value over allowing NULL pointers. Simon> - the complaint runs on a thread pool worker, but no Simon> complaint_interceptor is installed in those threads, so Simon> complaint_internal writes straight to gdb_stderr from a worker Simon> thread, outside the collect-and-re-emit-on-the-main-thread machinery. Simon> Besides the raw thread-safety issue, the message can land at an Simon> arbitrary point in the main thread's output. Using the Simon> complaint interceptor would fix both. Complaints are worthless IMO. If this is user-actionable or interesting in any way, it's better to warn. If it isn't user-actionable, then it can just be ignored. Simon> - The comment on cooked_index_entry::name says that it always points Simon> into mapped DWARF sections, which is not true anymore. The comment Simon> could talk about the "" case (or nullptr if we decided to go that Simon> route). I think it's actually wrong already since cooked_index_shard::finalize can synthesize names. It's really the lifetime of the pointer that is important, not the storage location; and the important invariant is that there's never a case where the string is freed but the entry is live. Tom