[Lldb-commits] [lldb] [LLDB] On AArch64, reconfigure register context first (PR #70742)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 30 21:52:41 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()) {
----------------
medismailben wrote:
I know this patch just moves code around but it feels a bit wrong that `ProcessGDBRemote` has some architecture dependent code ... May be we should do this special handling in `ABIAArch64` and call something like `GetABI().ReconfigureRegisters(DynamicRegisterInfo&)` instead.
https://github.com/llvm/llvm-project/pull/70742
More information about the lldb-commits
mailing list