+2020-11-11 Luis Machado <luis.machado@arm.com>
+
+ * aarch64-tdep.c (aarch64_prologue_prev_register): Guard use of
+ C registers.
+ (aarch64_dwarf2_prev_register): Likewise.
+ (aarch64_dwarf2_frame_init_reg): Likewise.
+ * aarch64-linux-nat.c
+ (aarch64_linux_nat_target::store_registers): Likewise.
+
2020-10-20 Luis Machado <luis.machado@arm.com>
* aarch64-linux-tdep.c (aarch64_linux_cregmap)
else if (regno < AARCH64_V0_REGNUM)
{
store_gregs_to_thread (regcache);
- fetch_cregs_from_thread (regcache);
+
+ /* If we have capability registers, refresh them when we store to
+ the general register set. */
+ if (tdep->has_capability ())
+ fetch_cregs_from_thread (regcache);
}
else if (tdep->has_sve ())
store_sveregs_to_thread (regcache);
= aarch64_make_prologue_cache (this_frame, this_cache);
struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
- int pcc_regnum = tdep->cap_reg_base + 31;
+
+ int pcc_regnum = -1;
+ if (tdep->has_capability ())
+ pcc_regnum = tdep->cap_reg_base + 31;
/* If we are asked to unwind the PC, then we need to return the LR
instead. The prologue may save PC, but it will point into this
| |
| |<- SP
+----------+ */
- int csp_regnum = tdep->cap_reg_base + 32;
+ int csp_regnum = -1;
+ if (tdep->has_capability ())
+ csp_regnum = tdep->cap_reg_base + 32;
if (prev_regnum == AARCH64_SP_REGNUM || prev_regnum == csp_regnum)
return frame_unwind_got_constant (this_frame, prev_regnum,
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
CORE_ADDR lr;
- int pcc_regnum = tdep->cap_reg_base + 31;
+ int pcc_regnum = -1;
+ if (tdep->has_capability ())
+ pcc_regnum = tdep->cap_reg_base + 31;
if (regnum == AARCH64_PC_REGNUM || regnum == pcc_regnum)
{
struct frame_info *this_frame)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- int pcc_regnum = tdep->cap_reg_base + 31;
- int csp_regnum = tdep->cap_reg_base + 32;
+ int pcc_regnum = -1;
+ int csp_regnum = -1;
+
+ if (tdep->has_capability ())
+ {
+ pcc_regnum = tdep->cap_reg_base + 31;
+ csp_regnum = tdep->cap_reg_base + 32;
+ }
if (regnum == AARCH64_PC_REGNUM || regnum == pcc_regnum)
{