[Lldb-commits] [lldb] [LLDB] On AArch64, reconfigure register context first (PR #70742)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 31 06:42:57 PDT 2023


================
@@ -1642,9 +1642,22 @@ ThreadSP ProcessGDBRemote::SetThreadStopInfo(
   }
 
   ThreadGDBRemote *gdb_thread = static_cast<ThreadGDBRemote *>(thread_sp.get());
-  RegisterContextSP gdb_reg_ctx_sp(gdb_thread->GetRegisterContext());
+  RegisterContextSP reg_ctx_sp(gdb_thread->GetRegisterContext());
 
-  gdb_reg_ctx_sp->InvalidateIfNeeded(true);
+  reg_ctx_sp->InvalidateIfNeeded(true);
+
+  // AArch64 SVE/SME specific code below updates SVE and ZA register sizes and
+  // offsets if value of VG or SVG registers has changed since last stop.
+  const ArchSpec &arch = GetTarget().GetArchitecture();
+  if (arch.IsValid() && arch.GetTriple().isAArch64()) {
----------------
DavidSpickett wrote:

It needs to modify the register context itself, so it's unlikely that it'll be as clean as that but I can give it a go. At least the ABI plugin could give a yes/no as to whether reconfiguring should occur.

https://github.com/llvm/llvm-project/pull/70742


More information about the lldb-commits mailing list