From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ADTeH2TR7WcdkiQAWB0awg (envelope-from ) for ; Wed, 02 Apr 2025 20:08: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=B5UDJ2DX; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7F4E01E0C3; Wed, 2 Apr 2025 20:08: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 0BFD81E0C0 for ; Wed, 2 Apr 2025 20:08:04 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B14E9385AC38 for ; Thu, 3 Apr 2025 00:08:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B14E9385AC38 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=B5UDJ2DX Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 2DA14384D15B for ; Wed, 2 Apr 2025 23:45:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2DA14384D15B 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 2DA14384D15B 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=1743637523; cv=none; b=NlOV0nPGMag+qhYiT3CNzOfVRwDj21teFDEr8YUwJGKgxfOZ5GH7SbChUXD4TonrusC0MEHk5QBMtrUkvdaUkyyViclkkp3sfYSjXhlPRAVKVv13Oiz+d9Gx0krhKzdE4MO2vyZpVus16tLcfMce5Wx25SV/eftqQOXc2RBwQvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743637523; c=relaxed/simple; bh=kWMrAeiBoeuVbz8YzVZ7Qe2iqCXIZJUg9ilyBPQjyw0=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=f+4iNWZ2zoayVwEJUcgoDQafRls+ZnGoeHGXFEn7efRnRrDHZEOW9g+Jd9FRur++S9GGYr0dsuf6jW0Au1aM1Jd7yqixK3qd8K6LJ9WPlNo8FCgAx7/URmMqEm91oBxre8PBlJkZk2/SocvLjZWYxfKoH0cfNnrOc1af0FFoa2s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DA14384D15B Received: from eig-obgw-5004a.ext.cloudfilter.net ([10.0.29.221]) by cmsmtp with ESMTPS id 07WTuw8UmiuzS07lqunDqN; Wed, 02 Apr 2025 23:45:22 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 07lpuTYjejrgq07lpu8qnp; Wed, 02 Apr 2025 23:45:21 +0000 X-Authority-Analysis: v=2.4 cv=PK7E+uqC c=1 sm=1 tr=0 ts=67edcc11 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=ItBw4LHWJt0A:10 a=CCpqsmhAAAAA:8 a=pxnj-rxqOsYdvGjtt8wA: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=vAYngq+OR4TYaCQTE0YcJOwgtSSzxh454okb2wvT+jw=; b=B5UDJ2DXIrz+fwB6Ew2+fFun4K oWdcl0FCf1E0zsb9CyLXvrk1g5Fc8OajK5cwVsQpfstB+uSrkLYbhTwVnZ5GW1IdXbETonfEDM4nA io08qVWHZixAlME3ZvMc/AZSA; 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 1u07lo-000000014hd-3LHp; Wed, 02 Apr 2025 17:45:20 -0600 From: Tom Tromey Date: Wed, 02 Apr 2025 17:45:25 -0600 Subject: [PATCH v2 26/28] Convert lookup_symbol_in_objfile MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250402-search-in-psyms-v2-26-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: 1u07lo-000000014hd-3LHp 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: 27 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfLC8hSAwXTa/T8Heyp1K+9mALB1OG/CS17qGGr7kw8Yo73z0HVg7eylN2fAn9ufD/FYvjGY/f3sGeYiqYPMLm1RlL5nXOiGvGUwNM3DXBJSKXRkTYY/z dp9KEMxjk3cfSCfmCdZ/PM08sMhT6CYmzjGiQ3zScRSC1hDkm9cDwGPRB2NPQ8T0aqBmqjsQXsAiOaF/d2tgwJg+Tl9AshSrL1g= 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 converts lookup_symbol_in_objfile to the callback approach by removing the call to lookup_symbol_in_objfile_symtabs. (The latter is not removed as there are still other callers.) Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16994 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16998 --- gdb/symtab.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/gdb/symtab.c b/gdb/symtab.c index 511dfd884bf41d61a475e953d0f68a2031bc2ca3..16e0628b49bca17cd955f7be544128da47e69bc7 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2595,24 +2595,12 @@ lookup_symbol_in_objfile (struct objfile *objfile, enum block_enum block_index, ? "GLOBAL_BLOCK" : "STATIC_BLOCK", name, domain_name (domain).c_str ()); - result = lookup_symbol_in_objfile_symtabs (objfile, block_index, - name, domain); - if (result.symbol != NULL) - { - symbol_lookup_debug_printf - ("lookup_symbol_in_objfile (...) = %s (in symtabs)", - host_address_to_string (result.symbol)); - return result; - } - result = lookup_symbol_via_quick_fns (objfile, block_index, name, domain); - symbol_lookup_debug_printf ("lookup_symbol_in_objfile (...) = %s%s", + symbol_lookup_debug_printf ("lookup_symbol_in_objfile (...) = %s", result.symbol != NULL ? host_address_to_string (result.symbol) - : "NULL", - result.symbol != NULL ? " (via quick fns)" - : ""); + : "NULL"); return result; } -- 2.46.1