From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id zjKXDCMpEWiufwwAWB0awg (envelope-from ) for ; Tue, 29 Apr 2025 15:31:47 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Cx4LLlnh; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0ED611E10E; Tue, 29 Apr 2025 15:31:47 -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.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_SBL_CSS 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 5A0F61E089 for ; Tue, 29 Apr 2025 15:31:45 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1EEF3858431 for ; Tue, 29 Apr 2025 19:31:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1EEF3858431 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Cx4LLlnh Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id DF39F3858C54 for ; Tue, 29 Apr 2025 19:31:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF39F3858C54 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DF39F3858C54 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745955073; cv=none; b=pviOknaWhB/JBmievGqRY54lYryX16Zw3WSKGZaYMBJPsfVNiRb4/Zus0ZgzS1Cgp6swv0mDmxHDMcN1lw8zBaiyCqfku8zcCmmRYrm+p3y9ev8XCbU2z7a+juEbETx7Ak4e+bLsOlyAvsrjEgk3T9Pjb3N+7bBgJzQwG3RwjxE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745955073; c=relaxed/simple; bh=JaJFjX4R4FBavgRENrcgj8MA1D8DlxY4l+6rD27D1sM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=LvumNtoAZtZF/4P40ouIhJUjJZK1X2/PrbKqpxo4XAnh26P+E1Z4tLNw/XQQo8UBKolOlTqdh+bBejuzzoF1E03RGZcydAOkqA66zUo7jtQaWaEbdF66OKiMtK3VEsZ1T9flFBX2aBYTgSUKXlTs0O6J6Wr3h4GN4wM/BaXrdM0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF39F3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745955072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GWO6PWzI82aQLoCJa7vp8HRmRFo5FonhfluQoukn5xA=; b=Cx4LLlnhNjq6U2//xC7PqwXZmz+LvUVjEmCy4aefs+sgryMm4YG7OP4FAl4CJrCCSw+/Kw SpVpQjEQ1s642MO31lmZ42rSY6r6DehH+gJDOiawN409f//47Sjke4jBGT5pFopH2xEHbt KLUR+R4HDwrAtwrsy3DIpRlyBc6JZSM= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-W4NkKxa8MwWhOMRmYcgulg-1; Tue, 29 Apr 2025 15:31:11 -0400 X-MC-Unique: W4NkKxa8MwWhOMRmYcgulg-1 X-Mimecast-MFC-AGG-ID: W4NkKxa8MwWhOMRmYcgulg_1745955070 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-4768a1420b6so124001681cf.1 for ; Tue, 29 Apr 2025 12:31:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745955070; x=1746559870; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GWO6PWzI82aQLoCJa7vp8HRmRFo5FonhfluQoukn5xA=; b=qqvOYqyF9lV4brcbaO9GUmX/V1TodhMVyxEfASOBeV0oBESH+X9RS7lxCvTtzmMTo+ Q61aklAKphLeUI8cJKzgPcidm84XTtQ8NhhuqPXRG1B1dwg1MKVuoUDEN4jbVYYmgdOX isk1POxY2l45NYbED/U5Z1QjoH8yMN6q8hwRd/LJBm69bAp3yrIfMq04BgESuW8yoMFf 2DLsCCC/lydZisHsKiW5R8WPRrgInmLRn1wMCP8ULrug2WsB50TZH7wXtnprMzUqWXBw 54fVl/SsMHftSFpcQJ29EZikwe6uhQ4njMUV93r8C1LdnCv0McSJx7xJHdgSy6RjgM4h UmVg== X-Gm-Message-State: AOJu0Ywql1e9lZatkNx6Lscj0xhDMU4pMK/NSkaz2nJEWphjeXtofBDk lIgT2Zke2a7ulHzzSCBTWvuPir0DEYkxwMIr0elkVI3OcQS4WbsGbYI6ASlliS2ofvMkB6XqxDK tdPYcC85kn/BRf1olu9Ov8n8SMQftydEJMjsnkAwd5Ag4w2hyHg25bu49fj4ike1EuDQ= X-Gm-Gg: ASbGncsWA1WimE3tTtiYlAWHdMmAKd37oNL4yV1zlW+vCRl9ULekCv0HsfdgCUT/vQm Sda//0VdQm66huuNihTX1BmRO1Fshw4WudRPnSffRN2FrW9ZhnQ6pvCnyfqzmLS25rcrteSlSa8 MClaJi0ERopL5e4VxruTJHS0jgqp6xIjJE6DOifIzufXowzI6fdkrwgUx8Wu27/wMXEKDqkz3Jy FzVT2a4chUoLOdBh35aR+0OoaVEVkmtkHIsIwp3cQsn1W8AYSs7il5RZW6eFvUnFOBFxnnRsAiS RXtCPaWfjgwNazF63hUC3ps= X-Received: by 2002:a05:622a:1e94:b0:476:b4c9:f4bc with SMTP id d75a77b69052e-489c5508614mr3940271cf.46.1745955070025; Tue, 29 Apr 2025 12:31:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJl+8xRhYY6q4DWY/3109H2HxTjMl+hkAr1UH9l9LiqtQ94dXLf7y9QYpfnh346uWzdfcatQ== X-Received: by 2002:a05:622a:1e94:b0:476:b4c9:f4bc with SMTP id d75a77b69052e-489c5508614mr3939761cf.46.1745955069548; Tue, 29 Apr 2025 12:31:09 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:9a69::1000? ([2804:14d:8084:9a69::1000]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6f4c0aaea81sm75524936d6.106.2025.04.29.12.31.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Apr 2025 12:31:09 -0700 (PDT) Message-ID: <8ef29cd7-7388-4a0b-91e9-e10b931489b2@redhat.com> Date: Tue, 29 Apr 2025 16:31:06 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 00/28] Search symbols via quick API To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20250402-search-in-psyms-v2-0-ea91704487cb@tromey.com> <87zfg0c55c.fsf@tromey.com> From: Guinevere Larsen In-Reply-To: <87zfg0c55c.fsf@tromey.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: po1R4Oc5Nw_etwO8MSgH8YIdz3gVqyydFaNBEV7WN2E_1745955070 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 4/28/25 7:06 PM, Tom Tromey wrote: >>>>>> "Guinevere" == Guinevere Larsen writes: > Guinevere> I am having an issue with the quick_fns interface, and while it isn't > Guinevere> affected by this series directly (as I originally thought it could > Guinevere> be), I would appreciate if you could share your expertise on this > Guinevere> area. The TL;DR of the issue is: the quick API seems to be caching > Guinevere> something and searching objfile B for a symbol can return a symbol > Guinevere> with details from objfile A (that was loaded first). I tried looking > Guinevere> around for where the cache could be hidden, but couldn't find it. Do > Guinevere> you know if where the cache is, if it really exists? > > Look for symbol_cache in symtab.c. Drat, this isn't the culprit I was looking for. My first test was using `maint flush symbol-cache` between printing symbols from different namespaces. No change. Then I tried stopping in the new lookup_symbol_in_linker_namespace, and then setting a breakpoint in get_symbol_cache. No hits. > Also there's a separate cache in ada-lang.c, but this one only affects > Ada. Yeah, I'm in C, so this shouldn't affect anything > It's been a while since I looked to see if either of these are really > helpful. > > There are also some debug settings for symbol lookup, look in symtab.c > and symfile-debug.c. I looked these up, but I have tried all of them, and nothing looked suspicious... The most interesting one was symtab-create, but even then, both of the namespaces had the exact same output, so I don't think the second one was shortcutting by using the first one's symtab. Thank you for the pointers, though, and if you have other ideas that may help (even if you're not sure if they're useful), I'll be glad to hear them! -- Cheers, Guinevere Larsen She/Her/Hers