From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Hu/hKrt1mGoT5R8AWB0awg (envelope-from ) for ; Wed, 02 Sep 2026 15:15:07 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=atXziauj; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 952231E166; Wed, 02 Sep 2026 15:15:07 -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 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 45C8E1E033 for ; Wed, 02 Sep 2026 15:14:56 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE02F4B9DB69 for ; Wed, 2 Sep 2026 19:14:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE02F4B9DB69 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=atXziauj Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 338CD4B9DB55 for ; Wed, 2 Sep 2026 19:14:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 338CD4B9DB55 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 338CD4B9DB55 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788376472; cv=none; b=VRc2zFkrakuWXC41c/AEajz836vNih0Vc44Mq8rpdhSkBIcIc+G5Pm8DXqbcLYof9riomv+9PXg/VSi78D5EnBntPyuiTtc+Sx5E2OMFsVr0eGAsa6gJhzto/+YG9Q3pXNH3pjSRrb+pXkzjikUKLUGNzsG1MsV7wNRVnsE3fh8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788376472; c=relaxed/simple; bh=d6oMKzW+DocLImN054pwIWAXOSRp5IvimI9cnUmLTHY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GCy/Mo9YObXvJMYuYsJhgHXAqaOf9LyoEGuXqk2QRbTcn7NpzE35Dm/n4u3+vLuCwED7ViXhc9WzbJ2mYz5/ftgRB42d+G99O+cQybo+eQRXIzvcuPcPCikixdbzfOMVxJAydGaFkHNCInYLvTbyGyQH9I/CtlMZ7P65eL9lXdg= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=atXziauj reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 338CD4B9DB55 Received: from eig-obgw-5003b.ext.cloudfilter.net ([10.0.29.155]) by cmsmtp with ESMTPS id 1mRXxF0ICv0nd1qPmxAT7w; Wed, 02 Sep 2026 19:14:31 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 1qPmxMuuGMSoY1qPmxzMLl; Wed, 02 Sep 2026 19:14:30 +0000 X-Authority-Analysis: v=2.4 cv=E9TNpbdl c=1 sm=1 tr=0 ts=6a987596 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=VdqzKS8jKosA:10 a=ItBw4LHWJt0A:10 a=20KFwNOVAAAA:8 a=zstS-IiYAAAA:8 a=RAro9Ha--SGnye6DZaQA:9 a=4G6NA9xxw8l3yy4pmD5M:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=foIgggTtIuoECPHVstRkk3hae2mmbtb9OfYuY/XZkus=; b=atXziaujKpdTcjyhtTjFiS1dC+ hCsl457UUTFLF7vMCnI+1Dh4dWiEsL4SdC22YIXpgaOATDhKpJRCkE/jQGkT2+zSvDgln52PgP23W vQBzcsvPn6wgkAZ20s5A7axdh; Received: from 97-122-117-2.hlrn.qwest.net ([97.122.117.2]:36870 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.5) (envelope-from ) id 1x1qPl-00000003yjy-2vCV; Wed, 02 Sep 2026 13:14:29 -0600 From: Tom Tromey To: Andrew Burgess Cc: gdb-patches@sourceware.org, Tom de Vries Subject: Re: [PATCH] gdb: fixes for DW_OP_entry_value when inferior is at entry point In-Reply-To: (Andrew Burgess's message of "Thu, 27 Aug 2026 22:04:55 +0100") References: X-Attribution: Tom Date: Wed, 02 Sep 2026 13:14:28 -0600 Message-ID: <87y0dj4ga3.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.117.2 X-Source-L: No X-Exim-ID: 1x1qPl-00000003yjy-2vCV X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-117-2.hlrn.qwest.net (bapiya) [97.122.117.2]:36870 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfH+4fJq+jJF/ocSztvIuoXGMJpwTNSyRF5tSTjKEvK/tcwFej/oLVWNfyk/4WQutOu0Mi8pAHbQUuOKodZAc5sDajefrDWRSNMKHkOlbPruEyTUosONn tZx4QkTsuVTWyD3XsQ4HbjnZDXtLLyBvQBBxneFfRDgGzsDEuiVvu5b92UjkLl3S/fIIMwn2K4BNGANF7wKpXiHVjNk2Z7EmT2w= 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 >>>>> "Andrew" == Andrew Burgess writes: Andrew> This fixes some issues with DW_OP_entry_value which are discussed in Andrew> PR gdb/34571. Thanks for doing this. Andrew> To understand the fix for this bug we need to first revisit the Andrew> earlier commit that introduced the bug: Andrew> commit 1bafda2c4595f0f936a5845caf9667b70b198091 Andrew> Date: Wed Apr 9 12:02:18 2025 +0200 Andrew> [gdb/symtab] Handle DW_OP_entry_value at function entry I appreciate the research and commentary as well. Looking at this code, I don't really follow why there's even such a large special case for trivial_entry_value. It seems like the code could be much simpler: when seeing a DW_OP_entry_value, evaluate the entry value expression in the target frame -- either the parent frame, or for the trivial_entry_value case, the current frame. That is, these special checks and calls to dwarf_block_to_dwarf_reg and dwarf_block_to_dwarf_reg_deref (which to be clear predate the trivial_entry_value patch) also seem totally unnecessary, as does this restriction: error (_("DWARF-2 expression error: DW_OP_entry_value is " "supported only for single DW_OP_reg* " "or for DW_OP_breg*(0)+DW_OP_deref*")); That said, I don't think there's anything wrong with an improvement that doesn't rewrite it all. And anyway maybe there's some subtlety I don't understand. Approved-By: Tom Tromey thanks, Tom