+2020-10-20 Luis Machado <luis.machado@arm.com>
+
+ * aarch64-tdep.c (aarch64_addr_bits_remove): New function.
+ (aarch64_gdbarch_init): Register hook.
+
2020-10-20 Luis Machado <luis.machado@arm.com>
* findvar.c (extract_typed_address): Handle capabilities.
return aarch64_pointer_to_address (gdbarch, type, buf);
}
+/* Remove useless bits from addresses in a running program. This is
+ important for Morello due to the C64 mode having the LSB set. */
+
+static CORE_ADDR
+aarch64_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR val)
+{
+ return (val & ~1);
+}
+
/* Initialize the current architecture based on INFO. If possible,
re-use an architecture from ARCHES, which is a list of
architectures already created during this debugging session.
/* Set address class hooks for capabilities. */
if (feature_capability)
{
+ /* Address manipulation. */
+ set_gdbarch_addr_bits_remove (gdbarch, aarch64_addr_bits_remove);
+
set_gdbarch_address_class_type_flags
(gdbarch, aarch64_address_class_type_flags);
set_gdbarch_address_class_name_to_type_flags