aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2019-02-20 11:56:23 +0000
committerAlan Hayward <alan.hayward@arm.com>2019-02-20 11:56:23 +0000
commit0ef8a082c32f34827479f2df8fbd431e08acd2d8 (patch)
tree43db042231e915026d01907215457223773beb1f
parenteed62915fd5b733632af343fbf3d47c7364f8e36 (diff)
downloadgdb-0ef8a082c32f34827479f2df8fbd431e08acd2d8.zip
gdb-0ef8a082c32f34827479f2df8fbd431e08acd2d8.tar.gz
gdb-0ef8a082c32f34827479f2df8fbd431e08acd2d8.tar.bz2
AArch64: Add default reggroups
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: * aarch64-tdep.c (aarch64_add_reggroups): New function (aarch64_gdbarch_init): Call aarch64_add_reggroups.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/aarch64-tdep.c16
2 files changed, 21 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index eb85581..721e636 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-02-20 Alan Hayward <alan.hayward@arm.com>
+
+ * aarch64-tdep.c (aarch64_add_reggroups): New function.
+ (aarch64_gdbarch_init): Call aarch64_add_reggroups.
+
2019-02-19 Simon Marchi <simon.marchi@polymtl.ca>
* top.h (source_file_name): Change to std::string.
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index bc928e14..f855393 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;