Message ID | 20250305003149.827350-1-tom@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 54D923858C5F for <patchwork@sourceware.org>; Wed, 5 Mar 2025 00:32:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54D923858C5F 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=bFsiKvYc X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 238D83858C30 for <gdb-patches@sourceware.org>; Wed, 5 Mar 2025 00:31:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 238D83858C30 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 238D83858C30 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741134713; cv=none; b=cOprLpX9ZKke5EKsY6xCUfIiloul3NVFm26ntsfZMEK/DIJkqDN96FQr1TLI+SBQ7xoMPwrJT9znQhJzlTJr9FZ+8ZdzmuUboBREPrHCxbjUAiNIjK7zVC4JIKjVz9yCKZzMXEya41+jirYHCp0nrGr97446AQ/k4cWUOz+UG3k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741134713; c=relaxed/simple; bh=Jl6vLO87s0SDSEqL7+837MmvJ8ZHg2HJiYA8VsWZiBQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=DyuzkrdsCwKftzNdhUJ6psoRPX1IDgfpjpC+6SnglIDNVDd09sctS7IzzDO20ocSz8Z3MjxbhT6VOPTNdJg3K2XOga3Hx+eailfV7dI5ns1bplruZcp3Pgoee0VOCvGva0KYposVNmG38R2FePPVE1bBAA7MKU4nRsT4nVzE77I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 238D83858C30 Received: from eig-obgw-5003a.ext.cloudfilter.net ([10.0.29.159]) by cmsmtp with ESMTPS id pBzQtKBb5iuzSpcfwtpfW4; Wed, 05 Mar 2025 00:31:52 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id pcfwtVjsRdQylpcfwt6U8G; Wed, 05 Mar 2025 00:31:52 +0000 X-Authority-Analysis: v=2.4 cv=McOnuI/f c=1 sm=1 tr=0 ts=67c79b78 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Vs1iUdzkB0EA:10 a=ItBw4LHWJt0A:10 a=u08CxK3XlWn7h-jtX94A:9 a=0bXxn9q0MV6snEgNplNhOjQmxlI=:19 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=v0CpP/W62bAZS5eFayfpq/uJffVsUoPJQAwttgzlNZA=; b=bFsiKvYcfnFLsACpsdI3e4ups5 1smVyC5947cJhflQTaqT6GEnqCcjvhTZQTnPtoJELBv7hFsFNzFfPngY/1NE8Y57QBrT2X9yL8W02 TjHiFnAj0SVeBE5q4BoacO+qB; Received: from [50.214.9.178] (port=54050 helo=prentzel.rce.guest) 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 1tpcfv-0000000366G-26Ys; Tue, 04 Mar 2025 17:31:51 -0700 From: Tom Tromey <tom@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey <tom@tromey.com> Subject: [PATCH] Use "::" as separator for Fortran in cooked index Date: Tue, 4 Mar 2025 17:31:49 -0700 Message-ID: <20250305003149.827350-1-tom@tromey.com> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 50.214.9.178 X-Source-L: No X-Exim-ID: 1tpcfv-0000000366G-26Ys X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (prentzel.rce.guest) [50.214.9.178]:54050 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfBBCYgwFTT++MknJw2838dPfV2OQNCEjcafMDldiiRnG1AOMYKyclIX5Hi/f7C37zvnymzsbCmkAe81rrOLIdAnNPpzYHA+A9vAsMiKjzIbz6ZaLEPbD tzfSI4mayMlGsCoYHuCrYllxjRWxGk6AXnUFjDvo8QKi/mcwOLKLyBcTSFw1qeyndiBVsbIREgu6U9RTuRkZpC3+mZVA/EWAWlI= X-Spam-Status: No, score=-3018.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, 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 |
Use "::" as separator for Fortran in cooked index
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 | success | Test passed |
linaro-tcwg-bot/tcwg_gdb_build--master-arm | success | Build passed |
linaro-tcwg-bot/tcwg_gdb_check--master-arm | success | Test passed |
Commit Message
Tom Tromey
March 5, 2025, 12:31 a.m. UTC
This teaches cooked_index_entry::full_name that "::" is the separator for Fortran. I don't know enough Fortran to write a test case for this. However, a different series I am working on has a regression if this patch is not applied. --- gdb/dwarf2/cooked-index.c | 1 + 1 file changed, 1 insertion(+)
Comments
On 3/4/25 7:31 PM, Tom Tromey wrote: > This teaches cooked_index_entry::full_name that "::" is the separator > for Fortran. I don't know enough Fortran to write a test case for > this. However, a different series I am working on has a regression if > this patch is not applied. > --- > gdb/dwarf2/cooked-index.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c > index 21d9dab5f41..bbe14adcd56 100644 > --- a/gdb/dwarf2/cooked-index.c > +++ b/gdb/dwarf2/cooked-index.c > @@ -234,6 +234,7 @@ cooked_index_entry::full_name (struct obstack *storage, bool for_main, > { > case language_cplus: > case language_rust: > + case language_fortran: > sep = "::"; > break; > > -- > 2.46.1 > What does this ultimately impact? Do you remember what the failure looked like? Simon
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes: >> This teaches cooked_index_entry::full_name that "::" is the separator >> for Fortran. I don't know enough Fortran to write a test case for >> this. However, a different series I am working on has a regression if >> this patch is not applied. Simon> What does this ultimately impact? Do you remember what the Simon> failure looked like? Not really but read on. The bigger series changes symbol lookup so that gdb no longer uses the idiom of "search existing compunits, then expand some units and look at those". Instead, all searches are done via expand_symtabs_matching, with the final decision being made in the callback. This is nice because it means that expanded symtabs that aren't useful to the current search are never examined. Also means that searches are independent of CU expansion order. However the drawback is that this exposes all the places where the index and the full reader disagree. And it turns out there's a number of these. With the patches these manifest as test failures because the indexer no longer finds a symbol, so the searcher never sees the CU. This was one of them, though I don't recall exactly which Fortran test regressed. I could find out if it's important. Or just leave this patch until I send the full series. I was just trying to pre-send the relatively independent patches so that the final series doesn't arrive in a huge chunk. Note that most of these "disagreement" bugs are probably already reproducible if you set up a more complicated test involving multiple CUs. Tom
On 3/5/25 11:58 AM, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes: > >>> This teaches cooked_index_entry::full_name that "::" is the separator >>> for Fortran. I don't know enough Fortran to write a test case for >>> this. However, a different series I am working on has a regression if >>> this patch is not applied. > > Simon> What does this ultimately impact? Do you remember what the > Simon> failure looked like? > > Not really but read on. > > The bigger series changes symbol lookup so that gdb no longer uses the > idiom of "search existing compunits, then expand some units and look at > those". Instead, all searches are done via expand_symtabs_matching, > with the final decision being made in the callback. > > This is nice because it means that expanded symtabs that aren't useful > to the current search are never examined. Also means that searches are > independent of CU expansion order. > > However the drawback is that this exposes all the places where the index > and the full reader disagree. And it turns out there's a number of > these. With the patches these manifest as test failures because the > indexer no longer finds a symbol, so the searcher never sees the CU. > > This was one of them, though I don't recall exactly which Fortran test > regressed. I could find out if it's important. Or just leave this > patch until I send the full series. I was just trying to pre-send the > relatively independent patches so that the final series doesn't arrive > in a huge chunk. > > Note that most of these "disagreement" bugs are probably already > reproducible if you set up a more complicated test involving multiple > CUs. Thanks for the explanation. I'll just rehash it to make sure I understand. With that change, when you'll do a name lookup, we'll ask the index "which CUs can potentially have a hit", expand the matched CUs that aren't expanded already, and then search all matched CUs. The index will therefore act as the first filter of CUs to be searched. Does that sound right? If so, it does indeed sound nice to reduce the "it works if the right CU is already expanded but doesn't work if not" bugs. I don't have any reason not to like this particular patch, so: Approved-By: Simon Marchi <simon.marchi@efficios.com> Simon
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
Simon> With that change, when you'll do a name lookup, we'll ask
Simon> the index "which CUs can potentially have a hit", expand the matched CUs
Simon> that aren't expanded already, and then search all matched CUs. The
Simon> index will therefore act as the first filter of CUs to be searched.
Simon> Does that sound right?
Yes.
Tom
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c index 21d9dab5f41..bbe14adcd56 100644 --- a/gdb/dwarf2/cooked-index.c +++ b/gdb/dwarf2/cooked-index.c @@ -234,6 +234,7 @@ cooked_index_entry::full_name (struct obstack *storage, bool for_main, { case language_cplus: case language_rust: + case language_fortran: sep = "::"; break;