From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PDj1OmXH4WdbwBkAWB0awg (envelope-from ) for ; Mon, 24 Mar 2025 16:58:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1742849893; bh=VT+4RTIrEgDBa5jNwPUlLuRgYNUzslcuWszdzb7Zep8=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=p9oGTCFNkaVsrR2taJar3O8cuH4zcnUg4oqXHnyqN1GMeulBOZTzGCHT4GRvmYG/R DNF1duzGidPrWyL/Zo1BnLLHw6DoRS+43bL5BwyUKWYcA31s1Ciq0dIxyRaGzLItuu u9JUs+SgY3BxPX0kfwnmpbDhgN2Wo4Y2tD4Znn5s= Received: by simark.ca (Postfix, from userid 112) id DEF4D1E100; Mon, 24 Mar 2025 16:58:13 -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.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 autolearn=unavailable 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=BKUjCn9Y; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=sODSh8b9; dkim-atps=neutral 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 DE0451E0C0 for ; Mon, 24 Mar 2025 16:58:12 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 72AB8385840F for ; Mon, 24 Mar 2025 20:57:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72AB8385840F 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=BKUjCn9Y; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=sODSh8b9 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id E7E373858D33 for ; Mon, 24 Mar 2025 20:53:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E7E373858D33 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 E7E373858D33 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=1742849591; cv=none; b=eupbskKG0ybxdc/eYcm9wdTzXR9Ggiw9NLIStpun3DzNpxsmRCYzV0DdQTA6nazC9UnQfHetZ+/EuzYYcomu6FjtjI5SAPYBZfTLu3dTOCrrL2Yxml1MxUtDoEj5j2uyLwSbj/2Gv8s27WERm3uUJVsUhOtyiF6MCCaqNGiYnFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742849591; c=relaxed/simple; bh=VT+4RTIrEgDBa5jNwPUlLuRgYNUzslcuWszdzb7Zep8=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=uJXHRCnsBsEVGitAVkC942usv7w8LQj4Fzi8GkCvmzM9gnxoyrP2FPzmI7ie+4QkkZtQhfxiD9B2cPD7pho7Imunka5+ZXT7jOoJUcyUq3tdxVRAlHCy9OG6Ku1llM8dk0qZ1zAIdfIi95JTz7kYCtZcvzhK3WicrwkPzAZL9uM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7E373858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1742849580; bh=VT+4RTIrEgDBa5jNwPUlLuRgYNUzslcuWszdzb7Zep8=; h=Date:Subject:To:References:From:In-Reply-To:From; b=BKUjCn9YBy8a9t42i8/QBO48mOzuABiIKsGMfZsy74YuHPLG/KVebpz1pZW814vXD UdHcndCLUpzPe1PXz5+AMsh7tCHCT6/cuoxH0qotC5toGLvd/RdT065+uTV+4mTePQ bMR6ZAypF7zC9rq6AvbLJB7Ik7Soi3l2rR5Z97dY= Received: by simark.ca (Postfix, from userid 112) id 887B51E100; Mon, 24 Mar 2025 16:53:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1742849579; bh=VT+4RTIrEgDBa5jNwPUlLuRgYNUzslcuWszdzb7Zep8=; h=Date:Subject:To:References:From:In-Reply-To:From; b=sODSh8b9HemEsrZp1XszMqYzd97YRPnmBeOYuABM8Wkb33B0Re2w9ndk4zvm8yy6Z OIooEzZJkZCZitW4kh/aQymesBorVB3RLUORD9WLUIYUvIB1Sak7LJw+KtBe1ZhEQT vgikD+ow0fEE6fYcKPvaFzN7jSbV47NExRnt0qxc= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B3C0E1E0C0; Mon, 24 Mar 2025 16:52:59 -0400 (EDT) Message-ID: <4301b473-7127-4c95-9f7a-d938f1bdb868@simark.ca> Date: Mon, 24 Mar 2025 16:52:59 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] Handle DWARF 5 separate debug sections To: Tom Tromey , gdb-patches@sourceware.org References: <20250323-dwz-dwarf-5-v2-v1-0-3c0775ca5514@tromey.com> <20250323-dwz-dwarf-5-v2-v1-2-3c0775ca5514@tromey.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <20250323-dwz-dwarf-5-v2-v1-2-3c0775ca5514@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 2025-03-23 15:20, Tom Tromey wrote: > DWARF 5 standardized the .gnu_debugaltlink section that dwz emits in > multi-file mode. This is handled via some new forms, and a new > .debug_sup section. > > This patch adds support for this to gdb. It is largely > straightforward, I think, though one oddity is that I chose not to > have this code search the system build-id directories for the > supplementary file. My feeling was that, while it makes sense for a > distro to unify the build-id concept with the hash stored in the > .debug_sup section, there's no intrinsic need to do so. > > This in turn means that a few tests -- for example those that test the > index cache -- will not work in this mode. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32808 I just had a few minutes to spare, so I just scanned the patch, I'm happy with it. More support for standard DWARF is nice. Acked-By: Simon Marchi Some random comments: > @@ -87,6 +88,139 @@ locate_dwz_sections (struct objfile *objfile, bfd *abfd, asection *sectp, > } > } > > +/* Helper that throws an exception when reading the .debug_sup > + section. */ > + > +static void > +debug_sup_failure (const char *text, bfd *abfd) > +{ > + error (_("%s [in modules %s]"), text, bfd_get_filename (abfd)); modules -> module? > + if (*buildid_len != 0) > + buildid->reset ((bfd_byte *) xmemdup (contents, *buildid_len, > + *buildid_len)); Could we return a view inside the section, instead of copying the bytes? It seems like we are just copying the bytes as is. Simon