From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wBYjI98tHmnAuhQAWB0awg (envelope-from ) for ; Wed, 19 Nov 2025 15:51:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1763585503; bh=UdlRjwyLJCkOiFlheWPufDQ60or/pAqjZobP+90T51U=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=u9MlS1p0qBuAmWrlqY/NRnleNOJRY5yjLqyBYR6R3q3xxNik9X9ZqrqFmVDGk1fWB TW3pIMrQrjHM/xToEACc6YtVdE+ind/wEC/4q6STcxX6yXHOElg5mgd+EsgPZYRcsd fjuVT5bjJOqgX1535ueO/UK1KsPusgw7N2my8IJE= Received: by simark.ca (Postfix, from userid 112) id 81AA21E0B6; Wed, 19 Nov 2025 15:51:43 -0500 (EST) 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=sWe4o4OU; 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 02E2C1E048 for ; Wed, 19 Nov 2025 15:51:43 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9C924384D14B for ; Wed, 19 Nov 2025 20:51:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C924384D14B 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=sWe4o4OU Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 9A544386103A for ; Wed, 19 Nov 2025 20:51:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A544386103A 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 9A544386103A 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=1763585468; cv=none; b=sXge7Ix8azJtoIcnfStRp1BW9faOY2iSZPWK+GdD5tWDmSbmZeYeNq2u8IaBQPa083+MgvsMt09P7SCrZVK5V4BkYElrtOA9jeTpXJpQhvAYA+3SOA0K1xud5RViwAEoYmXEgInls9c7Rd45DZ3NaPVTN6BOFcAkceaIR8E8SsU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763585468; c=relaxed/simple; bh=UdlRjwyLJCkOiFlheWPufDQ60or/pAqjZobP+90T51U=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=N3WX8JJlPrU/2W0WflWXjwry1Rcex+/1WAxiXy3bARU12HubA6va9N/M05TDJPKT/KFTJmH6N4Xb0oGWi/RlpdbO9bg3X4uKK8R5OQ2dpsGSfJ41pTonCrdkvbpE8ygY7c6Ev/GBCUIxuZygaiXDfDkyV0CmXfCCVsX1Q3mP4hM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A544386103A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1763585468; bh=UdlRjwyLJCkOiFlheWPufDQ60or/pAqjZobP+90T51U=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=sWe4o4OUKREmVAgT291QFDa62jb85ve1Df2IyuUP6xNppzNYvEdkpQusGqbt6vflH N70Fr0JbGbKam3IYKPHlkWPBK2OLHey6eNygv0Y3k4rSFIij00wTUUR8XntiV2SaQ/ b5YEuTnaFFmv01+pLqb2+UWrLw5cxnORpoudfcRU= Received: by simark.ca (Postfix) id DD59D1E048; Wed, 19 Nov 2025 15:51:07 -0500 (EST) Message-ID: <02fdbd23-933e-4bf4-83f2-12a8f7f48e1e@simark.ca> Date: Wed, 19 Nov 2025 15:51:07 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/6] gdb/dwarf: when in dwarf2_cu, read addr_size from dwarf2_cu::header To: Tom Tromey , Simon Marchi Cc: gdb-patches@sourceware.org References: <20251107211041.520697-1-simon.marchi@efficios.com> <20251107211041.520697-5-simon.marchi@efficios.com> <87ecpuq9xt.fsf@tromey.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <87ecpuq9xt.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 2025-11-19 11:11, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> I would prefer to not reintroduce the behavior of overwriting the > Simon> section info in dwarf2_per_cu, because: > > Simon> 1. I find it confusing, I like the invariant of dwarf2_per_cu::section > Simon> points to the stub, and dwarf2_cu::section points to where we > Simon> actually read the debug info from. > > The "overwrite" behavior was super messy and hard to untangle, so +1 to > getting rid of that. > > I was wondering if the new invariant is sufficiently documented. I > somewhat think the comments in dwarf2_per_cu should be updated to > explain it. Also while dwarf2_cu::section has a comment, I'm left > wondering about dwarf2_cu::header. I have a subsequent patch that updates the comments in dwarf2_per_cu for the section, offset and length fields. You can get a preview here: https://review.lttng.org/c/binutils-gdb/+/15628 I could improve the comment of dwarf2_cu::header to say that it always comes from where we really read the DIEs from (the .dwo file in case of split DWARF), if that's what you mean. I would need to check that this is really true. Simon