From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 3D1BF3865C33 for ; Thu, 11 Jan 2024 18:08:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3D1BF3865C33 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 3D1BF3865C33 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=1704996535; cv=none; b=D0xsdG+4vCO2/l7XRI2X2z81zC3zl9DJ4TOR30nn7kO/A/2tZ4iz1Saw8gRKXlLLIRNomLPGrZhR+0JjAZMeLLFYrTpRZaAvO+hjKTZn8gbqla+xV0fNvsH/G54W5QQHrkuA2ayVyoEFY8x7yOWzCyX/Zv0ADyGcF6cB/WzZQIQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704996535; c=relaxed/simple; bh=7nCD3KU99rvemZgwJUMZq0ttohmlibRAqys4VVfHsPc=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ff3ei7nN/JGyOSW5+NWU+DiLOZE61wM/1XH3QCxmSVg4XOhT6F4RbCTLyoeAe4IUOKCmX9hLhgs2bCdGYKsh/JkTv22Wemqf1UpgAUybiJETR9guhDR5qqx8Uawj2Oe4ANdRbkgly2eHZ8PESrGIRq6C5I5k8R7nnYtRTFEPvxI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1704996533; bh=7nCD3KU99rvemZgwJUMZq0ttohmlibRAqys4VVfHsPc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=MgIpw25hzgmA2DlTcJ4iONdJI07QjdZ2TIL1gHJSUL+5q1R1X1dO+vMZRW0qf9Bqz SE5702E3DcJB9lza6vcivqVbAT8WMuVmHssfW8wp7jLc+wVPgWJ7XjdLKS7MFCQX6K xMMkWXKTGP3CjkM2dRikqFAjfci9yQwCZk4t32y4= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (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 63AB51E098; Thu, 11 Jan 2024 13:08:51 -0500 (EST) Message-ID: Date: Thu, 11 Jan 2024 13:08:51 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: fix frame passed to gdbarch_value_to_register in value_assign Content-Language: fr To: Tom de Vries , Simon Marchi , gdb-patches@sourceware.org References: <20240111165125.134100-1-simon.marchi@efficios.com> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/11/24 12:24, Tom de Vries wrote: > On 1/11/24 17:51, Simon Marchi wrote: >> Commit 78f2fd84e83 ("gdb: remove VALUE_REGNUM, add value::regnum") >> introduced an unexpected change in value_assign. It replaced >> `get_prev_frame_always (next_frame)` with `next_frame`in the call to >> gdbarch_value_to_register. >> >> This is the result of a merge error, since I previously had a patch to >> change gdbarch_value_to_register to take the next frame, and later >> decided to drop it. Revert that change. >> >> Add a test based on the DWARF assembler to expose the problem and test >> the fix. I also tested on ppc64le to make sure the problem reported in >> PR 31231 was fixed. >> > > I applied the patch on x86_64, ran the test-case, observed the internal error, rebuild gdb, and observed it pass. > > Only one nit, I get: > ... > DUPLICATE: gdb.dwarf2/assign-variable-value-to-register.exp: p foo Ah thanks, missed it. > ... > > Tested-by: Tom de Vries Thanks, will push with the duplicate test name fixed. Simon