Message ID | 20250311-search-in-psyms-v1-1-d73d9be20983@tromey.com |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3DA423857C67 for <patchwork@sourceware.org>; Tue, 11 Mar 2025 14:13:50 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id 090103857C5F for <gdb-patches@sourceware.org>; Tue, 11 Mar 2025 14:12:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 090103857C5F 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 090103857C5F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741702367; cv=none; b=G+zrfm9YUrgRlapyVcsPfWWm/QYUrfqSdwTLgcHBl8l9ZW+XqxBVZd7lHIX+U8ytWQT0WYhCESpI1ZHDVOAFR/Ego+RSd1wKPtm6WpcO8KgYfOl2BmNhRypkNjZZzzhsR+tbn3tyCbQh/nBvl930LctWaT1127pASLecWBtAA78= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741702367; c=relaxed/simple; bh=74G5fIG0/T6ZJkb8rZG7cF3IUNit8Z+h87mtqqA+M8w=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=AxCWGe6TrNuNlRdrSSnuPwvkfUqd90v1D4eQTaTL3LBZZ3v3knBhvOUtNQei6w6FkDf9a9AF9xvFqGP32W1GEPFv+MPfcIw+XIklWeMAQWHDsZ736Un0qCDta8LuUFFy3N4kRai60WRj8PtDByQutLXmViYTbi2ZIoKBK3HfpmE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 090103857C5F Authentication-Results: sourceware.org; dkim=policy reason="signing key too small" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=SFwNz2QA Received: from eig-obgw-6002a.ext.cloudfilter.net ([10.0.30.222]) by cmsmtp with ESMTPS id rm6OtQLZCXshws0LetbLfD; Tue, 11 Mar 2025 14:12:46 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id s0Ldt8WPTPWBNs0LdtdNLa; Tue, 11 Mar 2025 14:12:45 +0000 X-Authority-Analysis: v=2.4 cv=A/+nPLWG c=1 sm=1 tr=0 ts=67d044de a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=Vs1iUdzkB0EA: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=Ht4VssIXbZozL3yinoAe5rmWKGebEfk+xL65YXBRMVs=; b=SFwNz2QARXcoV2juKo62MDNEdv 1uO62UT99iQ5XsgJ+Pd2tFk9TImX6guHbujrdwgK5Ulb21Bl8mVvSqii8/+ODC6y5n4qILvMRyQP7 gkaUz8a1zTS1jRSAQ4FOIu08a; Received: from 97-118-51-80.hlrn.qwest.net ([97.118.51.80]:33770 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 <tom@tromey.com>) id 1ts0Ld-000000003jP-0PBr; Tue, 11 Mar 2025 08:12:45 -0600 From: Tom Tromey <tom@tromey.com> Date: Tue, 11 Mar 2025 08:12:37 -0600 Subject: [PATCH 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: <20250311-search-in-psyms-v1-1-d73d9be20983@tromey.com> References: <20250311-search-in-psyms-v1-0-d73d9be20983@tromey.com> In-Reply-To: <20250311-search-in-psyms-v1-0-d73d9be20983@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey <tom@tromey.com> 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.118.51.80 X-Source-L: No X-Exim-ID: 1ts0Ld-000000003jP-0PBr X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-118-51-80.hlrn.qwest.net (prentzel.local) [97.118.51.80]:33770 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: MS4xfHLlEVu9dp7lxOIQvxjf8BU3bL12t3kP3ltGfTf7JAx3IQ4E7BYJuK1Cn1O8tebeuhtH26xXikDVVYIut8aY8LajMkpGuwSMCE5p250NGjrg5K02KuTz Z+55sRg0A4sMvVYm3Td8Lxp8cdzMQ1gU8Yr9R2QhQFX6vCKODpugH5XYpaDEwHY3H/90unjN4gmvrVjYgrC7AKLnw6d/P014kFM= X-Spam-Status: No, score=-3016.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
Search symbols via quick API
|
|
Commit Message
Tom Tromey
March 11, 2025, 2:12 p.m. UTC
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.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c index 866a07ce8a0d183c365dd809c045951b7df15418..9533a20e6c48cd164f1de853f1071ce5cb00ca88 100644 --- a/gdb/dwarf2/cooked-index.c +++ b/gdb/dwarf2/cooked-index.c @@ -240,8 +240,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; }