From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KPKpJ7TM7WeujSQAWB0awg (envelope-from ) for ; Wed, 02 Apr 2025 19:48:04 -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=SmT7IfCC; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9F68A1E0C3; Wed, 2 Apr 2025 19:48:04 -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 server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 42DA01E0C0 for ; Wed, 2 Apr 2025 19:48:04 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DED0A3857358 for ; Wed, 2 Apr 2025 23:47:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DED0A3857358 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=SmT7IfCC Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id 34648385843D for ; Wed, 2 Apr 2025 23:45:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 34648385843D 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 34648385843D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743637513; cv=none; b=t+NJGvxCPTcYYL2lDOn4XlayK9IOuAZrVgOfEXU6huWrSZHVa4GxGh/aVyXgTcZ+suvXp9KvbwodcSs61r8E/cQK9oTI/9cIBeuIh5bv3QTGNCdBq7iakh4dBrW2AwNlwyk/IAfzkwGPUM+0vPelSJOsgvs6Y5bQlgBC+fXIIak= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743637513; c=relaxed/simple; bh=xN9DxDqaWr5aqduQDO/+zjrGc5FatpQmCbxk77NGRlA=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=l9uUfE/moeh6XjvzpLTaYv6CAUPs5l+5FTxP1gJH0VbnaSLBUbdUKdgxK1do7GPXnPhEK5lA3A6vm9wF468xvPMJDclqATtAD7wefniBqzFOzxPyStjpgotbVdfnIpLlt5IqLYnTQt2mhb5+hpYlMMrq78w62gPMM86zI03zlgE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34648385843D Received: from eig-obgw-5009a.ext.cloudfilter.net ([10.0.29.176]) by cmsmtp with ESMTPS id zschtGaZ6WuHK07lguzjx7; Wed, 02 Apr 2025 23:45:12 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 07lfuCgaltELw07lfuNTSv; Wed, 02 Apr 2025 23:45:11 +0000 X-Authority-Analysis: v=2.4 cv=FPUdxfos c=1 sm=1 tr=0 ts=67edcc07 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=ItBw4LHWJt0A:10 a=CCpqsmhAAAAA:8 a=ptC_TE4zu40dn6tZ8PQA:9 a=QEXdDO2ut3YA:10 a=ul9cdbp4aOFLsgKbc677:22 a=6Ogn3jAGHLSNbaov7Orx: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=C4gPzH9WJSV3oUdAdsQ3CVPtpoRy+Cg76UrbQM0lNSY=; b=SmT7IfCCht4hT8bj8u3KR0cQDZ l8cBPZFGz8qqQgkTcAiYCqj0++g7spk6fndbqet0uI+YF5IOdmFEoch6SJ6sFP3VhZ9g6C6+k7RnJ L9Iddsx9/80a+ZgM6HD+7+XI2; Received: from 97-122-123-18.hlrn.qwest.net ([97.122.123.18]:56394 helo=prentzel.local) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1u07le-000000014hd-3cIZ; Wed, 02 Apr 2025 17:45:10 -0600 From: Tom Tromey Date: Wed, 02 Apr 2025 17:45:00 -0600 Subject: [PATCH v2 01/28] Add another minor hack to cooked_index_entry::full_name MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250402-search-in-psyms-v2-1-ea91704487cb@tromey.com> References: <20250402-search-in-psyms-v2-0-ea91704487cb@tromey.com> In-Reply-To: <20250402-search-in-psyms-v2-0-ea91704487cb@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.2 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.123.18 X-Source-L: No X-Exim-ID: 1u07le-000000014hd-3cIZ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-123-18.hlrn.qwest.net (prentzel.local) [97.122.123.18]:56394 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: MS4xfEnNuOmxC2goe0bcgdd2KWFnhtzplXUe12wvhBJCPxpKHnllS6Vkg7mVBLsBlMxVbaRsYEVuulGtEJbFX9RhXuAuu+LfUdkCazvFsUtCo+/JqX+4mKzI 9eo7TVKMirQ/eKjakPZ3PEHvL0K7YfjqrnjpSlUxfO/OWaT2uZRlO2/gyy8yC5o+ImKteIsDgJiD3DoQRKLsgHimKcyiFvqta48= 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 patch adds another minor hack to cooked_index_entry::full_name. In particular, if GNAT emits non-hierarchical names (still the default as the hierarchical series is blocked on one tricky problem), then a request to compute the "linkage-style" name will now just return the 'name' field. Without this tweak, this series would regress ada-cold-name.exp, because the search would look for "name.cold" but the index would return "name[cold]" as the "linkage" name (which would be wrong). This area is a bit difficult to unravel. The best plan here, IMO, is to change Ada to work like the other languages in gdb: store the natural name and do searches with that name. I think this is achievable, but I didn't want to try it here. I've updated the relevant bug (tagged below) to reflect this. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32766 --- gdb/dwarf2/cooked-index-entry.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gdb/dwarf2/cooked-index-entry.c b/gdb/dwarf2/cooked-index-entry.c index 3e322f140e5c0c1ca4c81d1a5affb0a5beb8750b..d0dac2f30004603254b211682c50109873a59015 100644 --- a/gdb/dwarf2/cooked-index-entry.c +++ b/gdb/dwarf2/cooked-index-entry.c @@ -188,8 +188,15 @@ cooked_index_entry::full_name (struct obstack *storage, break; case language_ada: + /* If GNAT emits hierarchical names (patches not in at the time + of writing), then we need to compute the linkage name here. + However for traditional GNAT, the linkage name will be in + 'name'. Detect this by looking for "__"; see also + cooked_index_shard::finalize. */ if ((name_flags & FOR_ADA_LINKAGE_NAME) != 0) { + if (strstr (name, "__") != nullptr) + return name; sep = "__"; break; } -- 2.46.1