[lldb] [Process/FreeBSD] Fix arm64 build after RegisterInfoPOSIX_arm64 changes
authorMichał Górny <mgorny@moritz.systems>
Thu, 29 Apr 2021 11:55:21 +0000 (13:55 +0200)
committerMichał Górny <mgorny@moritz.systems>
Sat, 1 May 2021 20:50:49 +0000 (22:50 +0200)
Commit 88a5b35d63f927db69ec953ff487a7ba2504a610 changed the API
of RegisterInfoPOSIX_arm64 and effectively broke the FreeBSD plugin.
Update it to work with the new API.

Differential Revision: https://reviews.llvm.org/D101521

lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp

index e98e0a8..4578138 100644 (file)
@@ -37,14 +37,12 @@ NativeRegisterContextFreeBSD::CreateHostNativeRegisterContextFreeBSD(
 NativeRegisterContextFreeBSD_arm64::NativeRegisterContextFreeBSD_arm64(
     const ArchSpec &target_arch, NativeThreadProtocol &native_thread)
     : NativeRegisterContextRegisterInfo(
-          native_thread, new RegisterInfoPOSIX_arm64(target_arch))
+          native_thread, new RegisterInfoPOSIX_arm64(target_arch, 0))
 #ifdef LLDB_HAS_FREEBSD_WATCHPOINT
       ,
       m_read_dbreg(false)
 #endif
 {
-  GetRegisterInfo().ConfigureVectorRegisterInfos(
-      RegisterInfoPOSIX_arm64::eVectorQuadwordAArch64);
   ::memset(&m_hwp_regs, 0, sizeof(m_hwp_regs));
   ::memset(&m_hbp_regs, 0, sizeof(m_hbp_regs));
 }
@@ -79,8 +77,6 @@ Status NativeRegisterContextFreeBSD_arm64::ReadRegisterSet(uint32_t set) {
     return NativeProcessFreeBSD::PtraceWrapper(
         PT_GETFPREGS, m_thread.GetID(),
         m_reg_data.data() + sizeof(RegisterInfoPOSIX_arm64::GPR));
-  case RegisterInfoPOSIX_arm64::SVERegSet:
-    return Status("not supported");
   }
   llvm_unreachable("NativeRegisterContextFreeBSD_arm64::ReadRegisterSet");
 }
@@ -94,8 +90,6 @@ Status NativeRegisterContextFreeBSD_arm64::WriteRegisterSet(uint32_t set) {
     return NativeProcessFreeBSD::PtraceWrapper(
         PT_SETFPREGS, m_thread.GetID(),
         m_reg_data.data() + sizeof(RegisterInfoPOSIX_arm64::GPR));
-  case RegisterInfoPOSIX_arm64::SVERegSet:
-    return Status("not supported");
   }
   llvm_unreachable("NativeRegisterContextFreeBSD_arm64::WriteRegisterSet");
 }