From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id BB6803858D33 for ; Fri, 22 Dec 2023 16:56:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB6803858D33 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 BB6803858D33 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=1703264188; cv=none; b=gE893YPrZjqCmvwV50EwZAQ9Mramxeb3nprOlghWkaUbndmjaHpWbNQu/JR7VvX1hfhvW+tCKEi20F7WE48WdnzT1WpRMcVtDvPUKfZS/n7CoroEb8hGvLHAYlNGNm5H66JyC2LVZnIf0VxChP4DaKIjGBl/fzhBSuq7rlfb+hk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703264188; c=relaxed/simple; bh=E1GbC1okkO6r59j7hEIJ8J4n0s8ts3OwEpe5/jsHzf0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=wV0PeoCkAd2pgfK6BIdcCEeCG34/w6MqY26cmVxqUSdnVoKEw3OQvJjkkDaYJe9nSg7/c8DNqIVXAdKYBVMBoj8qzd0nT9IE2DLCNKY+OVV+bEURIND5wAaikN3ilaJzKUFHpf2nBqKcmDE3J9cbuL+wZg1mPE73D+3tCb1OnCg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5003a.ext.cloudfilter.net ([10.0.29.159]) by cmsmtp with ESMTPS id GgoVrRuFe6nOZGip0rbPqH; Fri, 22 Dec 2023 16:56:26 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id GiozrlVJinCfvGiozrTezI; Fri, 22 Dec 2023 16:56:26 +0000 X-Authority-Analysis: v=2.4 cv=KKpJsXJo c=1 sm=1 tr=0 ts=6585bfba a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=e2cXIFwxEfEA:10 a=Qbun_eYptAEA:10 a=dzWzf_mpAAAA:8 a=S34CyXqubhfrmTtqL14A:9 a=b4DR9a7p2ZdsqdHBznES: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=EtIU82459o3QK3+5Zp8wBkNdPWXuuYoXMS/fIe6Aqvc=; b=RtYypiDP3DB50lrQ0tPd+NxmXx jOzSdAEkhQJanvS2bk0SqdD+I7s5eW1VZQ+2VkN0el6a2xGfozvgkk21Olt42FQ2lCBA5XyISZ9zk 1X1tuS3q+sY1iCjvEN6DVUjcQ; Received: from 71-211-161-25.hlrn.qwest.net ([71.211.161.25]:32950 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 1rGioz-003QiI-0d; Fri, 22 Dec 2023 09:56:25 -0700 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , Simon Marchi , 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> <87jzp6198t.fsf@tromey.com> <184fe643-5380-41a3-9f92-1eabc6ba61ef@simark.ca> X-Attribution: Tom Date: Fri, 22 Dec 2023 09:56:24 -0700 In-Reply-To: <184fe643-5380-41a3-9f92-1eabc6ba61ef@simark.ca> (Simon Marchi's message of "Fri, 22 Dec 2023 11:53:08 -0500") Message-ID: <8734vu18hz.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: 1rGioz-003QiI-0d X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-161-25.hlrn.qwest.net (murgatroyd) [71.211.161.25]:32950 X-Source-Auth: tom+tromey.com X-Email-Count: 15 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfJVe68x867rPIRkdnOB8aIX/ZIptKTqGAzZZUeQOZeCluqS80VRSe5Pv+ZjiL6V7Csv8MU7tBgw7SoYL2kqmFS+LLbzuWeNSCcNOj89KV+thouzCBf1V qkdM1crhqhxCZ87Hbwx0SDOlAa8tBLB/88JgqLxB1qouk/QA2Qdv4JKRY0VTC8XIQEMtU+v/vczd53xlHlXYmoi4jdZfQsiweGU= 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 List-Id: >>>>> "Simon" == Simon Marchi writes: >> 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. Simon> I initially thought that frame_info_ptr would be a thin enough wrapper Simon> that it would be better to pass it by value, but I see that it's 64 Simon> bytes long, so I guess you're right. I'll change my patches, but we Simon> should probably change the existing code too. Yeah, and it also registers/deregisters itself on a global list... Simon> It will also appease a frustration I had, where passing a frame_info_ptr Simon> down to a function would call the copy constructor. So, trying to step Simon> into that function would first step into the frame_info_ptr constructor Simon> first. I also find this annoying, though not yet to the point where I'm tempted to add a gdb feature to make it nicer. I think we have a bug open about stepping into the "last" function call on a line, which is pretty much this idea: skip over all the copy constructors and into the call you really care about. Dunno if this is even implementable with current debuginfo. Tom