From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WJ8kIDJQCWh0DQIAWB0awg (envelope-from ) for ; Wed, 23 Apr 2025 16:40:18 -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=DOmbtHp3; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7F1C11E0C3; Wed, 23 Apr 2025 16:40:18 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.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 autolearn=unavailable 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 0EF121E05C for ; Wed, 23 Apr 2025 16:40:18 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A2939385780C for ; Wed, 23 Apr 2025 20:40:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2939385780C 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=DOmbtHp3 Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 7A3423858D26 for ; Wed, 23 Apr 2025 20:39:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A3423858D26 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 7A3423858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745440780; cv=none; b=fc01gbB3BuqIsSMAQcAtrJYAL8S8TGDRN0MC3PqZwgrfyifzNYFhFJIdxW96Fj8e31bHUTgJIB5XfeLa5VS1NNKLqqNruDvUFFqt2Nb7iugnXPKGE9oiEXlEAv1+jqnNdA8+4eTZYF7K96WF3470xW4g4D5OYX7Ou53umhrvpls= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745440780; c=relaxed/simple; bh=LsmKkNAscz5lmen84xj1+tZvz1mrDkD5CLevv5tikYU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=CodM31KRJotRXxBChv5t+UiyaSx8/9nx8OKICjq8dxLmNfOBUufx0bOMZirL/sYInmEy43YAfmxG+u6pmzsSQkRJTmc2sPKmJMv28nwWUNoFcE6szhpGKEICkn8zfARW+aTnALDQUjQtETMcYyOtbOjMZZrwi1exbKFWgVgkeSo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A3423858D26 Received: from eig-obgw-6007a.ext.cloudfilter.net ([10.0.30.247]) by cmsmtp with ESMTPS id 7eYNu1kqVAfjw7gsdu9eHs; Wed, 23 Apr 2025 20:39:39 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 7gscuv2d8WbZN7gscuE14Q; Wed, 23 Apr 2025 20:39:39 +0000 X-Authority-Analysis: v=2.4 cv=NvrXcddJ c=1 sm=1 tr=0 ts=6809500b a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=XR8D0OoHHMoA:10 a=ItBw4LHWJt0A:10 a=ji9E9zASUqPc_FF7twkA:9 a=6Ogn3jAGHLSNbaov7Orx: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=/SSiN2kzpFXBlY3cowDam3zlqVo8OrxQWaZL6sImeY4=; b=DOmbtHp3/ar5sQkVSx3Taw8lVc 5I4j6rKeCFIPdQ7E8SeVf0/aeXha6B9F/6QzN8nS4/ZvGnuJpzsJDL28fbR4DdSsgO0VUPgtE2YIM sqAos8sJvuOtyAPf5tgN9VTWj; Received: from 97-118-46-156.hlrn.qwest.net ([97.118.46.156]:34464 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1u7gsc-00000000ylW-0CMT; Wed, 23 Apr 2025 14:39:38 -0600 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v2 10/28] Have expand_symtabs_matching work for already-expanded CUs In-Reply-To: <2aca0e1b-6042-4839-b266-a8eb0873c21d@simark.ca> (Simon Marchi's message of "Wed, 23 Apr 2025 11:53:58 -0400") References: <20250402-search-in-psyms-v2-0-ea91704487cb@tromey.com> <20250402-search-in-psyms-v2-10-ea91704487cb@tromey.com> <2aca0e1b-6042-4839-b266-a8eb0873c21d@simark.ca> X-Attribution: Tom Date: Wed, 23 Apr 2025 14:39:36 -0600 Message-ID: <87msc6wr1z.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.118.46.156 X-Source-L: No X-Exim-ID: 1u7gsc-00000000ylW-0CMT X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-118-46-156.hlrn.qwest.net (prentzel) [97.118.46.156]:34464 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfF7osckIwpZ0Kv1WF9yJ62PuQTCHglpNRWZHbRz7l2ASjNqn5wMwsB3Y6UMsBk48VNoSCabQEcFwgz8AjK4ssZLLioKJa3zzdVScmwkskpWupH+hMSV8 Gsnk2PXA42EWnN6dpB+U/Aap/48To4qF/I7uX4nLXhDtp9lIEF+pW0lHJKVe18npHz+jonUC6l5/Rl4RBko+Gcqv+fu31/MIv1c= 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 changes the contract of expand_symtabs_matching to also call the >> callback for an already-expanded symtab. With this change, the number >> of searched symtabs should sometimes be reduced. This also cuts down >> on the amount of redundant code. Simon> Not particularly important, but I'm not sure I understand how this patch Simon> alone would result in fewer symtabs being searched. I understand that Simon> it's a step towards the ultimate goal of this series, but I suppose you Simon> need the changes to the symbol lookup functions (that come later in this Simon> series) to reduce the number of searched symtabs? Yeah. I added some text to the commit message here. >> + /* We always need the file names filled in so that >> + expand_symtabs_matching can match filenames. It's convenient to >> + do this here. */ >> + if (!this_cu->files_read) >> + dw2_get_file_names_reader (reader.cu (), reader.top_level_die ()); Simon> In other spots, this is initialized lazily when something calls Simon> dw2_get_file_names. Why would it not work with expand_symtabs_matching? It's been a long time since I wrote this but my recollection is that if the CU is already expanded, then this is never done. I will take another look. Tom