From: John Baldwin Date: Tue, 2 Aug 2022 18:20:23 +0000 (-0700) Subject: aarch64-fbsd-nat: Support the capability register set for Morello. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c5dee0bdd892d957d9a60081cc8e499b1ebf657;p=thirdparty%2Fbinutils-gdb.git aarch64-fbsd-nat: Support the capability register set for Morello. --- diff --git a/gdb/aarch64-fbsd-nat.c b/gdb/aarch64-fbsd-nat.c index 4c8e9c4fa81..e696defa492 100644 --- a/gdb/aarch64-fbsd-nat.c +++ b/gdb/aarch64-fbsd-nat.c @@ -94,6 +94,13 @@ aarch64_fbsd_nat_target::fetch_registers (struct regcache *regcache, if (tdep->has_tls ()) fetch_regset (regcache, regnum, NT_ARM_TLS, &aarch64_fbsd_tls_regset, tdep->tls_regnum); + +#if __has_feature(capabilities) + if (tdep->has_capability ()) + fetch_register_set (regcache, regnum, PT_GETCAPREGS, + &aarch64_fbsd_capregset, + tdep->cap_reg_base); +#endif } /* Store register REGNUM back into the inferior. If REGNUM is -1, do @@ -113,6 +120,15 @@ aarch64_fbsd_nat_target::store_registers (struct regcache *regcache, if (tdep->has_tls ()) store_regset (regcache, regnum, NT_ARM_TLS, &aarch64_fbsd_tls_regset, tdep->tls_regnum); + +#ifdef notyet +#if __has_feature(capabilities) + if (tdep->has_capability ()) + store_register_set (regcache, regnum, PT_GETCAPREGS, + PT_SETCAPREGS, &aarch64_fbsd_capregset, + tdep->cap_reg_base); +#endif +#endif } /* Implement the target read_description method. */ @@ -122,6 +138,10 @@ aarch64_fbsd_nat_target::read_description () { aarch64_features features; features.tls = have_regset (inferior_ptid, NT_ARM_TLS) != 0; +#if __has_feature(capabilities) + features.capability = have_register_set (inferior_ptid, + PT_GETCAPREGS); +#endif return aarch64_read_description (features); }