From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id C+p3KdqFiGrwWTQAWB0awg (envelope-from ) for ; Fri, 21 Aug 2026 13:07:38 -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=RVrl9KaR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8FA1F1E033; Fri, 21 Aug 2026 13:07:38 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 AD2071E033 for ; Fri, 21 Aug 2026 13:07:37 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CEC684BB24C5 for ; Fri, 21 Aug 2026 17:07:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CEC684BB24C5 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=RVrl9KaR Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id DF4134BA2E04 for ; Fri, 21 Aug 2026 17:07:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF4134BA2E04 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 DF4134BA2E04 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787332033; cv=none; b=Iqt2AXsRyFaMSaw04AdKuRlAso4HUEmjfeGgD2E590KgPK84IWOpDuqY29XLBHpX6EeB59eo/J8S3bVZe0c3kcGonbC+0A63wPXF0zsF8btgIoKuc/lA3ZjE5V7EEQXNE0O4k5z719Dae3TI6/7aNGMjrBr+WEsKRIJ/7Cmq/gM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787332033; c=relaxed/simple; bh=dkoRMMZRQ6aJ2B1+YOc7hdwU6WO96kL38tTYAk6RmPE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=frEguXrVYUFTWbKSuy8eVTEWepDwyp1MwJUtvsjUP1KVCQw5P0D7AAuJDXYzN7i9AwBh0FOrzht/qBfnqzFRBqklieWX55rWMDkforovkR71GzhGZCgwD/8J90oeVhUw0irzEA6I+ziqLrKr03P8FrT8qqS18O98TEGTF7KJ2IQ= 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=RVrl9KaR reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF4134BA2E04 Received: from eig-obgw-6004b.ext.cloudfilter.net ([10.0.30.210]) by cmsmtp with ESMTPS id xS6MwcB3IuFzgxSi0wYuPs; Fri, 21 Aug 2026 17:07:12 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id xShzwHRj84qQIxShzwUwh5; Fri, 21 Aug 2026 17:07:11 +0000 X-Authority-Analysis: v=2.4 cv=dLummPZb c=1 sm=1 tr=0 ts=6a8885bf a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Sv0fKeRqtYgA:10 a=ItBw4LHWJt0A:10 a=20KFwNOVAAAA:8 a=k94g8mIjPkVdDkwN3Q0A:9 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=VBSwOoaUDlJ/2xCQ0a3a8PKkLP3uBab+f3iXOYVFfCI=; b=RVrl9KaR6IivzsnMkg20QK3xyO LjnCnzb+q/a0bpj3BcLPxYM0wZFNIm+WlAzwjNWDCe8xuieyz5YIsL7LuBy8BMGAqdVREuGoOXTJu EcIV9nHPRFtFjCOl/4t3ZpFyN; Received: from 97-122-117-2.hlrn.qwest.net ([97.122.117.2]:52418 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.5) (envelope-from ) id 1wxShy-00000001RBR-3xX0; Fri, 21 Aug 2026 11:07:11 -0600 From: Tom Tromey To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] [GDB 18] gdb: resolve class name via DW_AT_signature in cooked index In-Reply-To: <3ea45eb5b7eba98d5b0261a7648720a56fe6d578.1787133721.git.aburgess@redhat.com> (Andrew Burgess's message of "Wed, 19 Aug 2026 11:03:06 +0100") References: <3ea45eb5b7eba98d5b0261a7648720a56fe6d578.1787133721.git.aburgess@redhat.com> X-Attribution: Tom Date: Fri, 21 Aug 2026 11:07:09 -0600 Message-ID: <87ik53qu6a.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: 1wxShy-00000001RBR-3xX0 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-117-2.hlrn.qwest.net (bapiya) [97.122.117.2]:52418 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGgHg2YQYfnfAzv9whUvusdaQBhkEE8+An7OdhRUQT92GtPBay+ZKiJxOJv8nGbuUGzkueXk1KgAKpcQi9+rGjmwlAd/QcfC5vpoPbEBbbI5Hw4+ZXzZ odToC82lOAcowwqA+cljPqh851N0e36gRyQ6IK+q+b3Up0d9MqHo5vHAq1acOGdFBK2J1YjW3ntdHYqg0PrNE4XTDPvv98YArsg= 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 >>>>> "Andrew" == Andrew Burgess writes: Andrew> The problem is that the cooked index is unable to determine the name Andrew> of the parent class `base1` in this case, and so decides not to index Andrew> any of the member functions. Andrew> 2. cooked-indexer.c (scan_attributes): Handle DW_AT_signature by Andrew> looking up the signatured_type via lookup_signatured_type and Andrew> constructing a section_and_offset origin pointing to the type DIE Andrew> in the type unit. Restructure the is_declaration / origin- Andrew> following control flow: change the "else if (origin)" to a Andrew> standalone "if" so that class declaration stubs marked with Andrew> IS_TYPE_DECLARATION can still follow their origin to retrieve the Andrew> class name from the type unit. Add origin.reset() in the other Andrew> declaration paths to preserve the original behaviour for non-class Andrew> declarations and Ada imports. It's been a while since I was deep in the indexer, but looking at done_reading makes me wonder if this approach is safe: void cooked_index_worker_debug_info::done_reading () { /* This has to wait until we read the CUs, we need the list of DWOs. */ process_skeletonless_type_units (m_per_objfile, &m_index_storage); That is, I think skeletonless type units aren't processed until all other indexing is done. So if the signatured type appears in one of these, doesn't this mean the fix will fail? I don't remember how to set one of these up. Also my first thought when seeing this patch was that it might not be thread-safe. I'm still not completely sure. Perhaps it's fine because other type units seem to be (unfortunately) processed serially. A typical fix for these kinds of issues is to defer some of the work to the finalization step in the shard. I guess here the idea would be to store the signature and the relevant entry in some data structure, then patch up the parentage or whatever when finalizing. Tom