From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8zw5EfDqAGsTsiUAWB0awg (envelope-from ) for ; Fri, 20 Nov 2026 19:50:56 -0500 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=sjfmyFq1; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 348611E023; Fri, 20 Nov 2026 19:50:56 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no 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 A93931E023 for ; Fri, 20 Nov 2026 19:50:55 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 820BE4007E70 for ; Sat, 21 Nov 2026 00:50:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 820BE4007E70 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=sjfmyFq1 Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 6BEF540822A2 for ; Sat, 21 Nov 2026 00:50:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6BEF540822A2 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 6BEF540822A2 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795222226; cv=none; b=S9/5lMMcEPTe9csNGz5hgjopRfditJ0OD3AC3U+Aqptc9+NbPxBoqg6QvK/b7aYNxzl4WDKOGEr7iCGxLflnFyhlt65n9lFHDsoWLXFUXx/f56Wrvo8s6YAinAlTZ0UEciQUCqQ8sI6Yes321lpKu/EuPnyNMXubdUUTTXx/luE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795222226; c=relaxed/simple; bh=GMzxn3zYT3Pin8ER4wY/LBpZf2si2BSplpTZj5ABciQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RtDuKnFIerZc1SVcxCr2xV5+bU2SpjU3hl2Ib6CtWOMVnF9h8cj0uajd7SfUv45ny6GqLEUFpBcc6SSZXlgSJSSdaQCoHzrVmBSfH0R6co6eZwx8rsYZbtLtcKLslceaH4XTcL+CblDWAT/H480mlmZ6UB86JF9bkyE4JdDW0Z4= 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=sjfmyFq1 reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BEF540822A2 Received: from eig-obgw-6002b.ext.cloudfilter.net ([10.0.30.203]) by cmsmtp with ESMTPS id UR1uxj0GTV16IUZJBxa2nv; Sat, 21 Nov 2026 00:50:25 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id UZJAxoEni8cn4UZJBxzG7I; Sat, 21 Nov 2026 00:50:25 +0000 X-Authority-Analysis: v=2.4 cv=Qrde3Uyd c=1 sm=1 tr=0 ts=6b00ead1 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=zJRp6_cAMcgA:10 a=ItBw4LHWJt0A:10 a=20KFwNOVAAAA:8 a=WLit7DiLI5C__Rkxm1sA: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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=o0Wu3ckKAJzJsXBN5DHi0FnzyJJZAKn40ACdoZ/Te0o=; b=sjfmyFq1hA0IqLe5uCOWvmb0qn hrx+dcSxjpo8q52QAVpu9+ASCksWqfBzZ1Y267tfyCsFQk6XbNJfuOcUW51TL1aJ4jqYJs6SBjr4m us7+EERDpVnEJVKvUfREkG1Jd; Received: from 97-122-110-129.hlrn.qwest.net ([97.122.110.129]:53032 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xUZJA-00000003NLY-27wj; Fri, 20 Nov 2026 17:50:24 -0700 From: Tom Tromey To: Andrew Burgess Cc: Sendao Yan , gdb-patches@sourceware.org, tom@tromey.com Subject: Re: [PATCH] [gdb/symtab] Fall back to symtabs when the quick lookup misses In-Reply-To: (Andrew Burgess's message of "Fri, 20 Nov 2026 18:26:01 +0000") References: <20261120091803.89033-1-yansendao@126.com> X-Attribution: Tom Date: Fri, 20 Nov 2026 17:50:22 -0700 Message-ID: <87bj7jros1.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.110.129 X-Source-L: No X-Exim-ID: 1xUZJA-00000003NLY-27wj X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-129.hlrn.qwest.net (prentzel) [97.122.110.129]:53032 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfNN+YoYLJocrD5Ex7vxHGb2cXbOSyUgEASh003dRvMnnOCP1YE0tDJ/dI/bgJXzwp31jDtO8McoHiVNi2EavEaeD6X1SP8Cs3yA5ZCH2AOwf2bcNXqXk 4zNm4E+jO2do9Yhau4EH1Jc2bEUb1jjg5aWRHhV0SPWG/EitlhgsDeDL4Q99yaVOvq+ZnN9uBrXKlTg8kVthzR97luCM7GGh/MY= 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: >> + /* The cooked index does not necessarily contain every symbol that >> + the expanded symtabs do. In particular, GCC emits a DWARF5 >> + DW_TAG_variable for a static constexpr member using the DWARF >> + spelling of the enclosing template arguments (e.g. >> + std::ratio<1, 1>), while the C++ expression evaluator looks the >> + member up using the canonical spelling (std::ratio<1l, 1l>), so >> + the quick lookup misses it. Fall back to walking the symtabs, >> + which was the behaviour before commit 86ac8c546235. >> + >> + PR symtab/33533. */ >> + result = lookup_symbol_in_objfile_symtabs (objfile, block_index, >> + name, domain); I don't think we want to go back to doing this. I hate to NAK a patch but I think I will have to for this one. Andrew> My concern here is that if you *rely* on finding symbols in the expanded Andrew> symtabs, then the lookup only works if something else first expands the Andrew> symtab. This means we have random bugs where things don't work, then Andrew> they'll suddenly start working (once the symtab has expanded). ... and this is why. This was basically the reason for commit 86ac8c546235. I think the fix has to involve the lookup succeeding in the cooked index. One question I have is why the name isn't canonicalized in the cooked index, or to put it another way, why the C++ expression lookup and the cooked index disagree -- since the idea behind canonicalization is that there's a single spelling. thanks Tom