From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id umvZJgO8hWWCvycAWB0awg (envelope-from ) for ; Fri, 22 Dec 2023 11:40:35 -0500 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=l9SNuaZO; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8F6D11E0C3; Fri, 22 Dec 2023 11:40:35 -0500 (EST) 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 80A711E0AC for ; Fri, 22 Dec 2023 11:40:33 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2EB52385828C for ; Fri, 22 Dec 2023 16:40:33 +0000 (GMT) Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id BC7493858D28 for ; Fri, 22 Dec 2023 16:40:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC7493858D28 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 BC7493858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703263221; cv=none; b=TA41SFa1Qtp22RvByP8u7eJ2qhBLQDYtR6jqcJ2EVhRKAbCWl/jgU9wwZ+k2DWI6Riz+QMC0+ZSPwSypinHzn/bRz3yRb+zdyo8kzVgFxQflP+KzNlI+5/2XqIygHZrOY1uJ0BLpYICcuEvpc+xldBAJOW+RdJfwNNwjks6nEsE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703263221; c=relaxed/simple; bh=W4ySu+i4qdy9z7a2th3Vj6hN1xP/6NhHT3ze48YtKZY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VYlaMuuNtcLDqRld6VjBTKKkxK48uokat3YB0KWwTAujVysljrQRNWGljlASjghk6fDTqka7QKUsHDqNqTnXp1cnsXLHg/p12/E75tT9Qp9JRmKuoB6tsGtIxOOjjLU0vdygvo5mTgJuub6A1NfNePYOzy13Fow3xmZ4DyUMyrc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6007a.ext.cloudfilter.net ([10.0.30.247]) by cmsmtp with ESMTPS id GR5HrOlJG6nOZGiZQrbIDS; Fri, 22 Dec 2023 16:40:20 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id GiZPrLYigqmEoGiZPrMTBo; Fri, 22 Dec 2023 16:40:20 +0000 X-Authority-Analysis: v=2.4 cv=P+8pOwMu c=1 sm=1 tr=0 ts=6585bbf4 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=e2cXIFwxEfEA:10 a=Qbun_eYptAEA:10 a=7d_E57ReAAAA:8 a=Sz6PAuGvTxuWYs72IncA:9 a=jhqOcbufqs7Y1TYCrUUU: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:In-Reply-To:Date:References :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=+W+ky4zQKpOY1dOSxBnsTIO+Tde0G46MAsLuFixGcB8=; b=l9SNuaZOVjim03mQGXu6JTgpkN F2PcQnT0fmp00hkLJtucbZh50kLsav+UuDwR3IkWAAdPVUwyWz5W9YpAh3gtNJQorjxABxGII9nGA 411XOm2ck8SU+xnL5udD2LlM6; Received: from 71-211-161-25.hlrn.qwest.net ([71.211.161.25]:40592 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rGiZP-003Gxt-1F; Fri, 22 Dec 2023 09:40:19 -0700 From: Tom Tromey To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/9] gdb: pass frame_info_ptr to gdbarch_value_from_register References: <20231221191716.257256-1-simon.marchi@efficios.com> <20231221191716.257256-3-simon.marchi@efficios.com> X-Attribution: Tom Date: Fri, 22 Dec 2023 09:40:18 -0700 In-Reply-To: <20231221191716.257256-3-simon.marchi@efficios.com> (Simon Marchi's message of "Thu, 21 Dec 2023 14:16:23 -0500") Message-ID: <87jzp6198t.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) 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: 71.211.161.25 X-Source-L: No X-Exim-ID: 1rGiZP-003Gxt-1F X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-161-25.hlrn.qwest.net (murgatroyd) [71.211.161.25]:40592 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKY3gBmOadYehyItgwkB8xOWeOHi58nE4ndy+hbh0AYsUsjOcSmWttyQ3XzZls8wmyWujuA8ucSqGhVbtmMEe2ZPfI6h9kQVssnHLTQ1c/3CxY5GTwS6 sOK0wQIAPmhvUhePPlghg5kpBmFIEY+YnX4ZQ13pKXI16UK34h0GeQdHa7m//Ct7PKmj3LC6NBM6JL8Jq//VnzZ6Frupgbo6B5M= X-Spam-Status: No, score=-3016.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 >>>>> "Simon" == Simon Marchi writes: Simon> Pass a frame_info_ptr rather than a frame_id. This avoids having to do Simon> a frame lookup on the callee side, when we can just pass the frame down Simon> directly. Simon> I think this fixes a bug in rs6000-tdep.c where the id of the wrong Simon> frame was set to `VALUE_NEXT_FRAME_ID (v)`. Simon> +value * Simon> +default_value_from_register (gdbarch *gdbarch, type *type, int regnum, Simon> + frame_info_ptr this_frame) FWIW I tend to think new code should use 'const frame_info_ptr &' in most places. It's more efficient and the design of frame_info_ptr also makes it harmless, as the underlying frame_info member is mutable. Tom