* [PATCH] AArch64: Add default reggroups
@ 2019-02-13 14:03 Alan Hayward
2019-02-20 0:02 ` Kevin Buettner
0 siblings, 1 reply; 2+ messages in thread
From: Alan Hayward @ 2019-02-13 14:03 UTC (permalink / raw)
To: gdb-patches; +Cc: nd, Alan Hayward
Aarch64 does not define any reggroups. This causes "maintenance print
reggroups" to dump the default set (which is ok).
However, if a new group is added via an xml file, then this now becomes
the only group.
Fixes gdb.xml/tdesc-regs.exp on AArch64.
gdb/ChangeLog:
2019-02-13 Alan Hayward <alan.hayward@arm.com>
* aarch64-tdep.c (aarch64_add_reggroups): New function
(aarch64_gdbarch_init): Call aarch64_add_reggroups.
---
gdb/aarch64-tdep.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index bc928e14e9..f85539313f 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -2955,6 +2955,19 @@ aarch64_get_tdesc_vq (const struct target_desc *tdesc)
return sve_vq_from_vl (vl);
}
+/* Add all the expected register sets into GDBARCH. */
+
+static void
+aarch64_add_reggroups (struct gdbarch *gdbarch)
+{
+ reggroup_add (gdbarch, general_reggroup);
+ reggroup_add (gdbarch, float_reggroup);
+ reggroup_add (gdbarch, system_reggroup);
+ reggroup_add (gdbarch, vector_reggroup);
+ reggroup_add (gdbarch, all_reggroup);
+ reggroup_add (gdbarch, save_reggroup);
+ reggroup_add (gdbarch, restore_reggroup);
+}
/* Initialize the current architecture based on INFO. If possible,
re-use an architecture from ARCHES, which is a list of
@@ -3137,6 +3150,9 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Virtual tables. */
set_gdbarch_vbit_in_delta (gdbarch, 1);
+ /* Register architecture. */
+ aarch64_add_reggroups (gdbarch);
+
/* Hook in the ABI-specific overrides, if they have been registered. */
info.target_desc = tdesc;
info.tdesc_data = tdesc_data;
--
2.17.2 (Apple Git-113)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] AArch64: Add default reggroups
2019-02-13 14:03 [PATCH] AArch64: Add default reggroups Alan Hayward
@ 2019-02-20 0:02 ` Kevin Buettner
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Buettner @ 2019-02-20 0:02 UTC (permalink / raw)
To: gdb-patches; +Cc: Alan Hayward
On Wed, 13 Feb 2019 14:03:08 +0000
Alan Hayward <Alan.Hayward@arm.com> wrote:
> Aarch64 does not define any reggroups. This causes "maintenance print
> reggroups" to dump the default set (which is ok).
>
> However, if a new group is added via an xml file, then this now becomes
> the only group.
>
> Fixes gdb.xml/tdesc-regs.exp on AArch64.
>
> gdb/ChangeLog:
>
> 2019-02-13 Alan Hayward <alan.hayward@arm.com>
>
> * aarch64-tdep.c (aarch64_add_reggroups): New function
> (aarch64_gdbarch_init): Call aarch64_add_reggroups.
The first line of your ChangeLog entry needs a period.
Otherwise, LGTM.
Kevin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-20 0:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-13 14:03 [PATCH] AArch64: Add default reggroups Alan Hayward
2019-02-20 0:02 ` Kevin Buettner
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).