From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id O5DaC+vB12pP0zsAWB0awg (envelope-from ) for ; Tue, 20 Oct 2026 15:32:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1792524779; bh=PADzqoqOGKN4rClIsm6erMN7UQvz23i5tSl7zG+jQrs=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dddpnpleotwy8Wsk+fGzSbpwV9OchekAnrPCRtTPdzF48dg5wAG2ExTxkYc1z0AIV m2IXZiypnFTYPITI/j4e/oyYd08iosnSBTwvModbylvbrfCplHBVBFkI9jxkmrDrJR 0j8d/e1sdFvzENyAgw2epnTRgOPQNwpG7TfNd4jg= Received: by simark.ca (Postfix, from userid 112) id 0C3081E051; Tue, 20 Oct 2026 15:32:59 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 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 autolearn=ham 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=wPDdVvAi; dkim-atps=neutral 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 6FC251E04D for ; Tue, 20 Oct 2026 15:32:58 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2C88B4B920DA for ; Tue, 20 Oct 2026 19:32:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C88B4B920DA 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=wPDdVvAi Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 1B6034B99F55 for ; Tue, 20 Oct 2026 19:32:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B6034B99F55 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 1B6034B99F55 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792524754; cv=none; b=uQA3HU2zaEhDu2/+XyAT4i3JQTClYr1Dj/y10yLo9ZDeyQipUCOIQrz1iPlRr4p3NaxlmOnU+giWTcfOmxSxD7LilvJ8LDrRH+uccWo2jbzSiD7rkDRJnl48K30S8J70P3lo8mqboY2KATFHVhowJYFaUJOcyz4bXGpNWBXVBMo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792524754; c=relaxed/simple; bh=PADzqoqOGKN4rClIsm6erMN7UQvz23i5tSl7zG+jQrs=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=SylY3D4XeenWHHzJMPQPUc9ht7CAnfr4l7Y4ZwNXQGvRGqvrIXqH86EzVMJmT/qMMpbc5+XkSE5DIysmbuzJZkDAVSzU04Ha2x4p4C4kh3GxwbYf7M7CoyClNl1UEceKrWRpQE8/g8r+UI9MSICS5Qp0au7jCemOfMpdQK9KZJk= ARC-Authentication-Results: i=1; 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=wPDdVvAi DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B6034B99F55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1792524752; bh=PADzqoqOGKN4rClIsm6erMN7UQvz23i5tSl7zG+jQrs=; h=Date:Subject:To:References:From:In-Reply-To:From; b=wPDdVvAi93v41yJMcMhxAuoOZ7YHsSQZWN+FF2R5CZHVVbmgrb94I+QSAR3TOX+Qc cb7VosUmqdNqkCw4+zY8En18kitVmNxBB9aDBOGrbZcG+ByclSA2QhmYverg5WMBvz o5EyVAGXoSUGRqM2eW1lQGX3x+3p64MoUPVkMvUc= Received: by simark.ca (Postfix) id 0D42C1E04D; Tue, 20 Oct 2026 15:32:32 -0400 (EDT) Message-ID: <26ecbe46-5f92-4226-a7cd-8cb6b0665219@simark.ca> Date: Tue, 20 Oct 2026 15:32:31 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/6] gdb: extend .gdb_index tests to skip all data blocks To: Andrew Burgess , gdb-patches@sourceware.org References: <03e5fe9a7996d105cde0aef714392776acf2dcae.1792356284.git.aburgess@redhat.com> Content-Language: fr From: Simon Marchi In-Reply-To: <03e5fe9a7996d105cde0aef714392776acf2dcae.1792356284.git.aburgess@redhat.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 10/18/26 4:50 PM, Andrew Burgess wrote: > diff --git a/gdb/dwarf2/read-gdb-index.c b/gdb/dwarf2/read-gdb-index.c > index 5959b0ba6bc..d624ba1779c 100644 > --- a/gdb/dwarf2/read-gdb-index.c > +++ b/gdb/dwarf2/read-gdb-index.c > @@ -606,10 +606,12 @@ read_gdb_index_from_buffer (const char *filename, > > map->constant_pool = buffer.slice (metadata[i]); > > - if (map->constant_pool.empty () && !map->symbol_table.empty ()) > + if ((map->constant_pool.empty () || *cu_list_elements == 0) > + && !map->symbol_table.empty ()) Is an index with no CUs necessarily invalid? What if there are some TUs, or some CUs in the dwz file? It seems to me like we could let those go through, and if the index is really invalid in some way, then one of the checks you added in the previous patches will trigger and reject the index. > { > - /* An empty constant pool implies that all symbol table entries are > - empty. Make map->symbol_table.empty () == true. */ > + /* An empty constant pool or an empty CU list implies that all symbol > + table entries are empty. Recreate the symbol table as empty so > + this index will be ignored. */ > map->symbol_table > = offset_view (gdb::array_view (symbol_table, > symbol_table)); I wonder why this rejects the index by clearing symbol_table, instead of just returning false. Simon