From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qhKAHUHxhGlOKCoAWB0awg (envelope-from ) for ; Thu, 05 Feb 2026 14:36:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1770320193; bh=WnUBBjfuud9rxScPRvnAUoI1N+XTAHOoKfN/X7mFVW0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ccrxrtGRA0ZxCj9EgSOKCL2BAlydW9L9c9pOo5O9aY4jqbFyH7IubVoF3SvJ0u6Nw KooWuYhj+DhWqHqAhn0FoDoiEuUWkit5z8n6Nt/m6xZ3rJJHh/OyJQep29AUWbfihT Ds/zE/Sweapxp6g5dhSqA1wtRgs6E3ahppsYx7Jg= Received: by simark.ca (Postfix, from userid 112) id 66DFC1E0BA; Thu, 05 Feb 2026 14:36:33 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED,RDNS_NONE autolearn=no autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=PGsMGwku; dkim-atps=neutral Received: from vm01.sourceware.org (unknown [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 DA85F1E08D for ; Thu, 05 Feb 2026 14:36:32 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 689414BBCDB0 for ; Thu, 5 Feb 2026 19:36:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 689414BBCDB0 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=PGsMGwku Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 9EA764BBCDA7 for ; Thu, 5 Feb 2026 19:36:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9EA764BBCDA7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9EA764BBCDA7 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770320166; cv=none; b=bA3YNhUP8xqeNEkS07dHensxBUxNjuWfwggdR9BSUUfKxndMb0cDRNloeqGmZ+W/Uahr/YJg58jRE6B45P2Gs49X2q51+ix0NuCxUODyhz//inaSYmShVAxMj8PX/LAlMU+7TqMplTJuwEnB25pfoktd9SYQkLrZYcOcdI/C0v4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770320166; c=relaxed/simple; bh=WnUBBjfuud9rxScPRvnAUoI1N+XTAHOoKfN/X7mFVW0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=vjftfr7EFkEtcfu3RksKYImfcBuLZTUh5F9IED0RxhbplnwIGfntO4kVkd3NUaGhzFEPngcwIlzKJJToIfYG3rfQhpeFYIpWYqNDKG3hPWqIirQrlupkN8Kt1iUOeBWmy3s6jtuMOel+3nOKxQLTs6dWMUnsypvJet4qyAMZwv8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EA764BBCDA7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1770320166; bh=WnUBBjfuud9rxScPRvnAUoI1N+XTAHOoKfN/X7mFVW0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=PGsMGwkuMQcRFjTITHYsJRmGdg8E1DS017wbX1DXv+FNnFItm4FGrUV2bGy6Hj6sw NFhUeShLh6LL07esE5MvXoh0PZG7PLnnd2h0OTVWFLUNWiuAhn5o0utq8o+mJattnk sA5LIXZt+HxCFkxeyoz9bgOnj25I/ohG9PPZU4Xk= Received: by simark.ca (Postfix) id 7D61C1E08D; Thu, 05 Feb 2026 14:36:05 -0500 (EST) Message-ID: Date: Thu, 5 Feb 2026 14:36:05 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb/dwarf2: don't search included symtabs recursively To: Tom Tromey , Simon Marchi Cc: gdb-patches@sourceware.org References: <20260130025546.322629-3-simon.marchi@polymtl.ca> <20260203173640.215967-1-simon.marchi@efficios.com> <87ldh758eq.fsf@tromey.com> Content-Language: fr From: Simon Marchi In-Reply-To: <87ldh758eq.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 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 2/5/26 1:53 PM, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> It therefore seems unnecessary to do a recursive search, in > Simon> recursively_find_pc_sect_compunit_symtab, it will search some symtabs > Simon> multiple times. > > Agreed, thanks for finding this. > > We discussed this elsewhere but probably what we eventually want is a > mechanism to avoid searching included symtabs more than once across an > entire search. > > Simon> I am not sure how blockvectors work exactly, whether the blockvector of > Simon> the includer CU is a superset of the blockvectors of the includees. I > Simon> ask that because it seems like in practice, the requested PC always > Simon> seems to be found in the first searched CU. I haven't investigated this > Simon> point more than that though. > > I think each compunit_symtab gets a blockvector that describes exactly > the functions defined locally in that CU. > > It would be very unusual for a partial unit to really contain code. The > reason for this is that the normal reason to make a partial unit is to > share common things between CUs, but two CUs would not normally describe > the same function with the same address ranges. It wouldn't be invalid > to do this, just not very useful. > > Approved-By: Tom Tromey > > Tom Ok, so this "problem" wasn't really a problem in practice, because a PC would always be found in the first (top-level) compunit_symtab then (unless it's not found at all). Pushed, thanks. Simon