From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kCffItqV1GHELAAAWB0awg (envelope-from ) for ; Tue, 04 Jan 2022 13:45:46 -0500 Received: by simark.ca (Postfix, from userid 112) id 8C1011F0DB; Tue, 4 Jan 2022 13:45:46 -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=unavailable 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 39AC21F0B9 for ; Tue, 4 Jan 2022 13:45:46 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 557C7385842C for ; Tue, 4 Jan 2022 18:45:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 557C7385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1641321945; bh=AQSHfbF82IO7UXIWXrbKAiGBS6CmavPROEmib9CrytE=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Q/+NpsrkUpgpZgswLreJHVlty4EJkaIbx7+65Z+5WYWX2RfXG2TbqJfW2ie8cObP0 +ioDcJnTBXCaetgHXqGPg/Ey5WJeoPINqL5vy0Kbi1smeE3+hRCQzH4MS5F6IG7oDq Mx3g1RwK4tEXzDZusqSDue+ySRjbhr8fQdNd3BVg= Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by sourceware.org (Postfix) with ESMTPS id 0A5EE385841F for ; Tue, 4 Jan 2022 18:44:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A5EE385841F Received: by mail-qk1-x731.google.com with SMTP id 202so32077899qkg.13 for ; Tue, 04 Jan 2022 10:44:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AQSHfbF82IO7UXIWXrbKAiGBS6CmavPROEmib9CrytE=; b=KAzVko6qFWHznW4w80c9vM6TdN/AkDelx8ec83B5aMjbWiSTCqO2w+mIrRrlTnvSTD mkEvcaKZ1gWiIY7M4cKifeFYEQgCigAQOKFODfqcaHsZkLGX+UqgPfWkgZOtYvlJJg4X 8pUjaIpISyNiyio07T/fTfA9f0NS3bqwt4Y2LrjleY2GggjpmEBZlcTPajY/P6Eh+3M/ uRDcuM6VYiVAwdeo8R7jCAzTUUb7QfrgKxqqXIeJqqtJ/aTqPTMcQUwopt5JHt0iq1q1 UQLJxGqi3fnJYQtvLX0XYg7S9Er42gHPffxsVDAmHNcbnMBHsOKby8LuHjAMqN7CXQph rrgw== X-Gm-Message-State: AOAM5327FQgC+ER32y1k26TRliCUAI4r5Vi7X+0RZMl7ekJbC+/f8hB2 LhsCKg9lJsEoaIgWhbmPjCL/v38avhyaPQ== X-Google-Smtp-Source: ABdhPJxWEKbIVbqAIkjoDJlWUUrmbDTQrN/NB1J0aEgEN/9nesVWI/t/oqElmon6ApuFDTZzy8e59Q== X-Received: by 2002:a37:603:: with SMTP id 3mr35956527qkg.60.1641321881620; Tue, 04 Jan 2022 10:44:41 -0800 (PST) Received: from ?IPv6:2804:7f0:4841:563b:d924:ff26:cde9:15a7? ([2804:7f0:4841:563b:d924:ff26:cde9:15a7]) by smtp.gmail.com with ESMTPSA id x13sm33641551qkp.102.2022.01.04.10.44.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jan 2022 10:44:41 -0800 (PST) Subject: Re: [PATCH] [AArch64] Fix PR gdb/28681 To: Simon Marchi , gdb-patches@sourceware.org References: <20220104172254.3665546-1-luis.machado@linaro.org> <35890e99-0fc3-49b3-4eb1-59cdf606c2e1@polymtl.ca> Message-ID: <1e813eab-3b10-6f78-4375-d72feace6e7c@linaro.org> Date: Tue, 4 Jan 2022 15:44:38 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <35890e99-0fc3-49b3-4eb1-59cdf606c2e1@polymtl.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Luis Machado via Gdb-patches Reply-To: Luis Machado Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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.