From: Luis Machado luis.machado@arm.com
Remove code to return LR for a CLR DWARF register.
For the pure capability ABI, set pc to PCC and sp to CSP.
gdb/ChangeLog:
YYYY-MM-DD Luis Machado luis.machado@arm.com
* aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Don't return LR for CLR. (aarch64_gdbarch_init): Set pc to PCC and sp to CSP for pure cap ABI. --- gdb/aarch64-tdep.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index e30a61e6a6..14b46e85c8 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -2580,10 +2580,6 @@ aarch64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
if (tdep->has_capability ()) { - /* FIXME-Morello: Redirect CLR to LR for now. */ - if (reg == AARCH64_DWARF_CLR) - return AARCH64_LR_REGNUM; - if (reg >= AARCH64_DWARF_C0 && reg <= AARCH64_DWARF_C0 + 30) return tdep->cap_reg_base + (reg - AARCH64_DWARF_C0);
@@ -4331,6 +4327,9 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Set address class hooks for capabilities. */ if (feature_capability) { + set_gdbarch_sp_regnum (gdbarch, tdep->cap_reg_csp); + set_gdbarch_pc_regnum (gdbarch, tdep->cap_reg_pcc); + /* Address manipulation. */ set_gdbarch_addr_bits_remove (gdbarch, aarch64_addr_bits_remove);