From: Luis Machado <luis.machado@linaro.org>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH,v2] SVE/FPSIMD fixup for big endian
Date: Tue, 8 Dec 2020 16:22:34 -0300 [thread overview]
Message-ID: <b2b38dc8-7946-bf52-8308-c8cfecba8ddb@linaro.org> (raw)
In-Reply-To: <4f95c775-677c-8858-6fd7-41b405cd3099@polymtl.ca>
On 12/8/20 1:10 PM, Simon Marchi wrote:
> On 2020-12-04 9:22 a.m., Luis Machado via Gdb-patches wrote:
>> With the AArch64-specific parts approved, do the global maintainers have any comments on the trad-frame changes, or does it look good?
>
> The changes in trad-frame look good to me. If you feel like it, you could
> change the bytes/size parameters in the functions' prototypes to use
> gdb::array_view.
I agree. The current interface is being abused a little. I'll push this
fix first, then I'll do it as a separate patch. Might be useful for
other targets as well, like ones that have larger vector types.
>
> While reading your patch, I spotted some cleanups I'd like to see happening
> to make the code cleaner/safer (ideas for future patches). The first one
> would be to make the fields private and add getters that assert that the kind
> of value you are getting is indeed the one stored, a bit like I did for the
> dynamic_prop structure. That could catch some problems where we set value as
> bytes but fetch it as a register number.
>
> The second one is: instead of overloading the realreg field to hold the kind
> of value that is stored in the object, and overloading the "addr" field for
> both LONGEST values and addresses, it would be much clearer to have a kind
> field + a union:
>
> struct trad_frame_saved_reg
> {
> trad_frame_saved_reg_kind kind;
>
> union
> {
> CORE_ADDR addr;
> LONGEST value;
> int regnum;
> gdb_byte *data;
> };
> };
>
> It would take less space, too.
Thanks. That's good feedback. I'll take notes and will work on something
to improve these structures/mechanisms.
prev parent reply other threads:[~2020-12-08 19:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 18:55 [PATCH][AArch64] " Luis Machado
2020-12-01 11:28 ` Alan Hayward
2020-12-01 12:19 ` Luis Machado
2020-12-01 17:38 ` Alan Hayward
2020-12-01 18:40 ` Luis Machado
2020-12-02 9:07 ` Alan Hayward
2020-12-02 17:57 ` [PATCH,v2] " Luis Machado
2020-12-03 17:35 ` Alan Hayward
2020-12-03 17:37 ` Luis Machado
2020-12-04 14:22 ` Luis Machado
2020-12-08 13:39 ` Luis Machado
2020-12-08 16:10 ` Simon Marchi
2020-12-08 19:22 ` Luis Machado [this message]
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=b2b38dc8-7946-bf52-8308-c8cfecba8ddb@linaro.org \
--to=luis.machado@linaro.org \
--cc=gdb-patches@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).