From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 62A2A385842D for ; Thu, 9 Feb 2023 13:45:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 62A2A385842D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from r6.localdomain (82-217-174-174.cable.dynamic.v4.ziggo.nl [82.217.174.174]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 544DF30067CA; Thu, 9 Feb 2023 14:45:35 +0100 (CET) Received: by r6.localdomain (Postfix, from userid 1000) id 1AE463401CE; Thu, 9 Feb 2023 14:45:35 +0100 (CET) Message-ID: <2c67601b72f61c1394e1248aaeecc8c403692dca.camel@klomp.org> Subject: Re: [PATCH v2 4/7] x86_64_return_value_location: Support lvalue and rvalue references From: Mark Wielaard To: Ilya Leoshkevich Cc: elfutils-devel@sourceware.org Date: Thu, 09 Feb 2023 14:45:34 +0100 In-Reply-To: <20230208195226.144143-5-iii@linux.ibm.com> References: <20230208195226.144143-1-iii@linux.ibm.com> <20230208195226.144143-5-iii@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-3036.3 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,TXREP 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: Hi Ilya, On Wed, 2023-02-08 at 20:52 +0100, Ilya Leoshkevich wrote: > On the low level, they are the same as pointers. Yes, I can see how that would work for return types. Do you happen to have a testcase for this? Right below this code is a check whether the type has a DW_AT_byte_size, and if not we'll assume 8 as (address) size if the type is either DW_TAG_pointer_type or DW_TAG_ptr_to_member_type. Should the same be done for DW_TAG_reference_type and DW_TAG_rvalue_reference_type? This doesn't seem x86_64 specific, other backends have similar code, I assume they all need a similar update? Thanks, Mark > Signed-off-by: Ilya Leoshkevich > --- > backends/x86_64_retval.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/backends/x86_64_retval.c b/backends/x86_64_retval.c > index f9114cb1..e668eacc 100644 > --- a/backends/x86_64_retval.c > +++ b/backends/x86_64_retval.c > @@ -106,6 +106,8 @@ x86_64_return_value_location (Dwarf_Die *functypedie,= const Dwarf_Op **locp) > case DW_TAG_enumeration_type: > case DW_TAG_pointer_type: > case DW_TAG_ptr_to_member_type: > + case DW_TAG_reference_type: > + case DW_TAG_rvalue_reference_type: > { > Dwarf_Attribute attr_mem; > if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,