{ 0 }
};
+/* Since the C register numbers are determined dynamically, we leave
+ placeholders so we can update the numbers later. */
+static struct regcache_map_entry aarch64_linux_cregmap[] =
+ {
+ /* FIXME-Morello: Need to decide if we are reading the whole 16 bytes or
+ just the upper 8 bytes of the capability registers. */
+ { 31, -1, 8 }, /* c0 ... c30 */
+ { 1, -1, 8 }, /* Stack Pointer Capability */
+ { 1, -1, 8 }, /* Program Counter Capability */
+ { 1, -1, 16 }, /* Default Data Capability */
+ { 1, -1, 8 },
+ { 0 }
+ };
+
/* Register set definitions. */
const struct regset aarch64_linux_gregset =
regcache_supply_regset, regcache_collect_regset
};
+/* The capability register set. */
+const struct regset aarch64_linux_cregset =
+ {
+ aarch64_linux_cregmap,
+ regcache_supply_regset, regcache_collect_regset
+ };
+
/* The fields in an SVE header at the start of a SVE regset. */
#define SVE_HEADER_SIZE_LENGTH 4
AARCH64_LINUX_SIZEOF_PAUTH, &aarch64_linux_pauth_regset,
"pauth registers", cb_data);
}
+
+ /* FIXME-Morello: We still need to provide a valid check for the presence of
+ capability registers. */
+ if (tdep->has_capability ())
+ {
+ cb (".reg-cap", AARCH64_LINUX_CREGS_SIZE,
+ AARCH64_LINUX_CREGS_SIZE, &aarch64_linux_cregset,
+ NULL, cb_data);
+ }
}
/* Implement the "core_read_description" gdbarch method. */
if (tdep->has_capability ())
{
+ /* Initialize the register numbers for the core file register set. */
+ /* FIXME-Morello: This needs to be updated. */
+ aarch64_linux_cregmap[0].regno = tdep->cap_reg_base;
+ aarch64_linux_cregmap[1].regno = tdep->cap_reg_base + 32;
+ aarch64_linux_cregmap[2].regno = tdep->cap_reg_base + 31;
+ aarch64_linux_cregmap[3].regno = tdep->cap_reg_base + 33;
+
set_gdbarch_report_signal_info (gdbarch,
aarch64_linux_report_signal_info);
}