[Lldb-commits] [PATCH] D101521: [lldb] [Process/FreeBSD] Fix arm64 build after RegisterInfoPOSIX_arm64 changes

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 29 04:57:20 PDT 2021


mgorny created this revision.
mgorny added reviewers: omjavaid, krytarowski, emaste, labath.
Herald added subscribers: kristof.beyls, arichardson.
mgorny requested review of this revision.

Commit 88a5b35d63f927db69ec953ff487a7ba2504a610 <https://reviews.llvm.org/rG88a5b35d63f927db69ec953ff487a7ba2504a610> changed the API
of RegisterInfoPOSIX_arm64 and effectively broke the FreeBSD plugin.
Update it to work with the new API.


https://reviews.llvm.org/D101521

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


Index: lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
===================================================================
--- lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
+++ lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
@@ -37,14 +37,12 @@
 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 @@
     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 @@
     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");
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101521.341473.patch
Type: text/x-patch
Size: 1628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210429/f356e42c/attachment.bin>


More information about the lldb-commits mailing list