From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YBRZBfGW1GH6LAAAWB0awg (envelope-from ) for ; Tue, 04 Jan 2022 13:50:25 -0500 Received: by simark.ca (Postfix, from userid 112) id 141361F0DB; Tue, 4 Jan 2022 13:50:25 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 764F01F0B9 for ; Tue, 4 Jan 2022 13:50:24 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E8D913858424 for ; Tue, 4 Jan 2022 18:50:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8D913858424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1641322223; bh=cOwt6eGqReJSGKV0BD1/qTTL+RaDidOB1cOXW9OFEH0=; 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=ZZ/HymYBkUZYCpByazoX8+zfGWZO6e8RidPz41HPzWFnB15ysqo4C34hPbZO/Lgwz 1GTZXQEnoehjcz3zLTcsgNacj55P3DjtSqqp2UBBdwiXm3lI7nCJ0AchsESFPfefoH mKoqUwqfnAjiQnmVw8mbob0hrP0ufq7sk3eI2SMo= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 331BB3858421 for ; Tue, 4 Jan 2022 18:48:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 331BB3858421 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 204Im0HP028130 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 4 Jan 2022 13:48:04 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 204Im0HP028130 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)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id F064D1F0B9; Tue, 4 Jan 2022 13:47:59 -0500 (EST) Message-ID: Date: Tue, 4 Jan 2022 13:47:59 -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> <35890e99-0fc3-49b3-4eb1-59cdf606c2e1@polymtl.ca> <1e813eab-3b10-6f78-4375-d72feace6e7c@linaro.org> In-Reply-To: <1e813eab-3b10-6f78-4375-d72feace6e7c@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:48:00 +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 13:44, Luis Machado wrote: > On 1/4/22 3:09 PM, Simon Marchi wrote: >> >> >> 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. > > Did you want the entire bugzilla PR subject or something else? I can't really tell from your reply, sorry. No, not the bugzilla title (which is `Wrong pretty-printed unique_ptr value when using "finish"`), since that is a distant symptom of the problem you fix. The subject should state what you are fixing, so something about the handling of trivially copyable return values on AArch64 (something like that, I didn't follow the resolution of the bug close enough). Simon