From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id paOeGamN1GH2KwAAWB0awg (envelope-from ) for ; Tue, 04 Jan 2022 13:10:49 -0500 Received: by simark.ca (Postfix, from userid 112) id 561111F0DB; Tue, 4 Jan 2022 13:10:49 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D5FAF1F0B9 for ; Tue, 4 Jan 2022 13:10:48 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1D7C33858408 for ; Tue, 4 Jan 2022 18:10:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D7C33858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1641319848; bh=sp/zv2D3SOUaLf6XaqBHTyW5GIzgHxsBMpiNVMVkVT8=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ZTo77uHJ3MEzK3nz89SrP6AU52M3vknDmVKD93Hk2IToFY7SXNx5PL/KavcX6ogL9 dCcJBIiP+GoZU/q2WLRravEw1fXFlGe1ymu2xt0hQx37NDJz36Ae5y4Ic+Vwd+KIyz WLL71VpKFaeSGW6dTlkIsmloVIiuadOV3jSjl+JI= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id C8EEC3858439 for ; Tue, 4 Jan 2022 18:10:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8EEC3858439 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 204I9wGD011144 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 4 Jan 2022 13:10:03 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 204I9wGD011144 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 70B861F0B9; Tue, 4 Jan 2022 13:09:58 -0500 (EST) Message-ID: <35890e99-0fc3-49b3-4eb1-59cdf606c2e1@polymtl.ca> Date: Tue, 4 Jan 2022 13:09:58 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH] [AArch64] Fix PR gdb/28681 Content-Language: en-US To: Luis Machado , gdb-patches@sourceware.org References: <20220104172254.3665546-1-luis.machado@linaro.org> In-Reply-To: <20220104172254.3665546-1-luis.machado@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 4 Jan 2022 18:09:58 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-01-04 12:22, Luis Machado via Gdb-patches wrote: > This is the same as commit b1718fcdd1d2a5c514f8ee504ba07fb3f42b8608, but > fixing things for AArch64. > > With the patch, gdb.cp/non-trivial-retval.exp has full passes on > AArch64-Linux Ubuntu 20.04/18.04. > --- > gdb/aarch64-tdep.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c > index 70fb66954a4..802762f303c 100644 > --- a/gdb/aarch64-tdep.c > +++ b/gdb/aarch64-tdep.c > @@ -2323,6 +2323,15 @@ aarch64_extract_return_value (struct type *type, struct regcache *regs, > valbuf += X_REGISTER_SIZE; > } > } > + else if (!language_pass_by_reference (type).trivially_copyable) > + { > + /* If the object is a non-trivial C++ object, the result is passed as a > + pointer stored in X0. */ > + CORE_ADDR addr; > + > + regs->cooked_read (AARCH64_X0_REGNUM, &addr); > + read_memory (addr, valbuf, TYPE_LENGTH (type)); > + } > else > { > /* For a structure or union the behaviour is as if the value had I'll let somebody else review this (probably Andrew), but please change the patch subject to something descriptive, not just the bug number. Thanks, Simon