From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gxL1EWVi8mcP6igAWB0awg (envelope-from ) for ; Sun, 06 Apr 2025 07:15:49 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=viric.name header.i=@viric.name header.a=rsa-sha256 header.s=dkim1 header.b=NuQISF7E; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 37D501E0C3; Sun, 6 Apr 2025 07:15:49 -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 1C6311E05C for ; Sun, 6 Apr 2025 07:15:46 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 92E1E384A462 for ; Sun, 6 Apr 2025 11:15:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92E1E384A462 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=viric.name header.i=@viric.name header.a=rsa-sha256 header.s=dkim1 header.b=NuQISF7E Received: from mail.viric.name (mail.viric.name [37.18.133.75]) by sourceware.org (Postfix) with ESMTPS id 4FEF93857354 for ; Sun, 6 Apr 2025 11:15:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4FEF93857354 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=viric.name Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=viric.name ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4FEF93857354 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=37.18.133.75 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743938114; cv=none; b=FkyGGuj+/8vmp87Qplop9DMvIhM2WZYO9VUBrrle3LFieVsdqP2czS9cH3UmipFYP8CSurY2H0O2qeO1TZCJuKCLv8Np7BWzcEZyyB5tkaLP/Wlp510jQ26QYC+6RJfqLfS/GAPRroQ3PLtTLH5Rwt83o9QClB5iKQPWHavB92A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743938114; c=relaxed/simple; bh=MYyIt45KA4jaZB0cReLtLIjIdlsPEqstGkb/G/R9bqg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Dmd5pYQ2YM3gdI3KNo2tUl/1XDSy2SLY+slWfkVhQ1N0luWATKbzFQPIfnw8uONOA60mfOxqnmcm0WM2jC5kKB9CnJKNPUkIuY5LfaSNAUbHNZotMr1PrsPt7YFOD/+lSNlk0XJjpc/x6w2j6xpo66f8OdBXWhGBp4jnPhAzt30= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4FEF93857354 Received: by mail.viric.name (Postfix, from userid 1000) id 4BB2C1A8C57A; Sun, 06 Apr 2025 13:15:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=viric.name; s=dkim1; t=1743938113; bh=MYyIt45KA4jaZB0cReLtLIjIdlsPEqstGkb/G/R9bqg=; h=Date:From:To:Subject; b=NuQISF7EIwifB4sla65l+2QduiO2LzV/7iZp+JfwNbdNcpol+pbQR0fzAY/Qz11YD W2AyZiaVUC7nhEgTaIVrBgwAxKjMY5IybR/crbhBMxOY8YikOvLh13AIBgQ2u76n92 jIbtKGLOozDkSR6UUDIDH327MsQE9ejtUBrZqrOc= Date: Sun, 6 Apr 2025 13:15:13 +0200 From: =?utf-8?B?TGx1w61z?= Batlle i Rossell To: gdb-patches@sourceware.org Subject: [PATCH] Document that index-cache requires build ID Message-ID: X-Accept-Language: ca, es, eo, ru, en, jbo, tokipona MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2gr3q3tip3iknoej" Content-Disposition: inline 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 --2gr3q3tip3iknoej Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Attached --2gr3q3tip3iknoej Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Document-that-index-cache-requires-build-ID.patch" >From 4dfcd1888e3fc3c5707e3f697268d820679a1c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 6 Apr 2025 13:11:06 +0200 Subject: [PATCH] Document that index-cache requires build ID --- gdb/doc/gdb.texinfo | 2 ++ gdb/dwarf2/read.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index e034ac53295..37b65ab72ac 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -22934,6 +22934,8 @@ Indices only work when using DWARF debugging information, not stabs. It is possible for @value{GDBN} to automatically save a copy of this index in a cache on disk and retrieve it from there when loading the same binary in the future. This feature can be turned on with @kbd{set index-cache enabled on}. +Note that the cache will use the ELF build ID to identify the cached indices, +so files without Build ID will not have their index cached. The following commands can be used to tweak the behavior of the index cache. @table @code diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 71fd352343a..f6a221a57de 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -2237,7 +2237,11 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd) { const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ()); if (build_id == nullptr) + { + dwarf_read_debug_printf ("Not using index-cache for %s due to missing build-id", + objfile_name (obj)); return {}; + } return global_index_cache.lookup_gdb_index (build_id, &dwarf2_per_bfd->index_cache_res); -- 2.47.0 --2gr3q3tip3iknoej--