From: Alan Hayward via Gdb-patches <gdb-patches@sourceware.org>
To: Luis Machado <luis.machado@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>, nd <nd@arm.com>,
"gdb-patches\\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/4] [ARM] Small refactoring of arm gdbarch initialization
Date: Fri, 8 Oct 2021 16:03:57 +0000 [thread overview]
Message-ID: <451AA8F6-E7C5-4CD3-AB39-25597ECE6B9A@arm.com> (raw)
In-Reply-To: <20211005144521.1965198-3-luis.machado@linaro.org>
Lgtm
Alan
> On 5 Oct 2021, at 15:45, Luis Machado <luis.machado@linaro.org> wrote:
>
> This is in preparation to MVE support, where we will define another
> pseudo register. We need to define the pseudo register numbers *after*
> accounting for all the registers in the XML description, so move
> the call to tdesc_use_registers up.
>
> If we don't do it, GDB's register count won't consider registers contained
> in the XML but ignored by GDB, throwing the register numbering off.
> ---
> gdb/arm-tdep.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
> index ab6999ae209..2a6bfb1b3f7 100644
> --- a/gdb/arm-tdep.c
> +++ b/gdb/arm-tdep.c
> @@ -9470,6 +9470,17 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
> set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
> }
>
> + if (tdesc_data != nullptr)
> + {
> + set_tdesc_pseudo_register_name (gdbarch, arm_register_name);
> +
> + tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data));
> +
> + /* Override tdesc_register_type to adjust the types of VFP
> + registers for NEON. */
> + set_gdbarch_register_type (gdbarch, arm_register_type);
> + }
> +
> if (have_vfp_pseudos)
> {
> /* NOTE: These are the only pseudo registers used by
> @@ -9484,17 +9495,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
> set_gdbarch_pseudo_register_write (gdbarch, arm_pseudo_write);
> }
>
> - if (tdesc_data != nullptr)
> - {
> - set_tdesc_pseudo_register_name (gdbarch, arm_register_name);
> -
> - tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data));
> -
> - /* Override tdesc_register_type to adjust the types of VFP
> - registers for NEON. */
> - set_gdbarch_register_type (gdbarch, arm_register_type);
> - }
> -
> /* Add standard register aliases. We add aliases even for those
> names which are used by the current architecture - it's simpler,
> and does no harm, since nothing ever lists user registers. */
> --
> 2.25.1
>
next prev parent reply other threads:[~2021-10-08 16:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 14:45 [PATCH 0/4] [ARM] M-profile MVE extension support Luis Machado via Gdb-patches
2021-10-05 14:45 ` [PATCH 1/4] [ARM] Refactor some constants Luis Machado via Gdb-patches
2021-10-08 16:03 ` Alan Hayward via Gdb-patches
2021-10-05 14:45 ` [PATCH 2/4] [ARM] Small refactoring of arm gdbarch initialization Luis Machado via Gdb-patches
2021-10-08 16:03 ` Alan Hayward via Gdb-patches [this message]
2021-10-05 14:45 ` [PATCH 3/4] [ARM] Refactor pseudo register numbering Luis Machado via Gdb-patches
2021-10-08 16:04 ` Alan Hayward via Gdb-patches
2021-10-11 13:06 ` Luis Machado via Gdb-patches
2021-10-05 14:45 ` [PATCH 4/4] [ARM] Add support for M-profile MVE extension Luis Machado via Gdb-patches
2021-10-05 15:55 ` Eli Zaretskii via Gdb-patches
2021-10-08 16:34 ` Alan Hayward 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=451AA8F6-E7C5-4CD3-AB39-25597ECE6B9A@arm.com \
--to=gdb-patches@sourceware.org \
--cc=Alan.Hayward@arm.com \
--cc=luis.machado@linaro.org \
--cc=nd@arm.com \
--cc=peter.maydell@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