Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [AArch64] Fix PR gdb/28681
Date: Tue, 4 Jan 2022 15:49:51 -0300	[thread overview]
Message-ID: <f2ce0050-b9c0-2120-6ac6-a7c377e7e88d@linaro.org> (raw)
In-Reply-To: <abe56262-9a38-007e-1b0c-4f33b89b21ca@polymtl.ca>

On 1/4/22 3:47 PM, Simon Marchi wrote:
> 
> 
> 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).

How about "gdb: on aarch64 non-trivial C++ objects are returned in memory"?

  reply	other threads:[~2022-01-04 18:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 17:22 Luis Machado via Gdb-patches
2022-01-04 18:09 ` Simon Marchi via Gdb-patches
2022-01-04 18:44   ` Luis Machado via Gdb-patches
2022-01-04 18:47     ` Simon Marchi via Gdb-patches
2022-01-04 18:49       ` Luis Machado via Gdb-patches [this message]
2022-01-04 18:56         ` Simon Marchi via Gdb-patches
2022-01-04 19:04           ` Luis Machado via Gdb-patches
2022-01-05 12:54 ` Andrew Burgess via Gdb-patches
2022-01-11 21:17   ` Luis Machado via Gdb-patches
2022-01-11 21:22 ` [PATCH] [AArch64] Properly extract the reference to a return value from x8 Luis Machado via Gdb-patches
2022-01-12 11:14   ` Andrew Burgess via Gdb-patches
2022-01-13 14:19     ` Luis Machado via Gdb-patches
2022-01-13 15:18       ` Andrew Burgess via Gdb-patches
2022-01-13 15:22         ` Luis Machado via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2ce0050-b9c0-2120-6ac6-a7c377e7e88d@linaro.org \
    --to=gdb-patches@sourceware.org \
    --cc=luis.machado@linaro.org \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox