From: Simon Marchi <simon.marchi@polymtl.ca>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: replace FRAME_OBSTACK_{C, Z}ALLOC macros with templated functions
Date: Mon, 10 Nov 2025 16:24:10 -0500 [thread overview]
Message-ID: <a43422cc-83ed-4659-8611-f460991224eb@polymtl.ca> (raw)
In-Reply-To: <87cy5pbnf4.fsf@linaro.org>
On 11/10/25 4:14 PM, Thiago Jung Bauermann wrote:
> simon.marchi@polymtl.ca writes:
>
>> From: Simon Marchi <simon.marchi@polymtl.ca>
>>
>> While reviewing a patch, I saw these macros and thought they could be
>> modernized a bit.
>
> Nice! Just one comment:
>
> Most calls to the new functions don't use the 'struct' keyword, e.g.:
>
>> - cache = FRAME_OBSTACK_ZALLOC (struct aarch64_prologue_cache);
>> + auto *cache = frame_obstack_zalloc<aarch64_prologue_cache> ();
>
> while some do, e.g.:
>
>> - cache = FRAME_OBSTACK_ZALLOC (struct amd64_frame_cache);
>> + auto *cache = frame_obstack_zalloc<struct amd64_frame_cache> ();
>
> I suggest standardising on always omitting the struct keyword.
In that situations, the keyword is necessary. I started by removing
them all, but then compilation fails if there is also a function by that
name.
Simon
next prev parent reply other threads:[~2025-11-10 21:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 5:21 simon.marchi
2025-11-10 21:14 ` Thiago Jung Bauermann
2025-11-10 21:24 ` Simon Marchi [this message]
2025-11-25 20:11 ` [PATCH] gdb: replace FRAME_OBSTACK_{C,Z}ALLOC " Simon Marchi
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=a43422cc-83ed-4659-8611-f460991224eb@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.org \
/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