[Lldb-commits] [PATCH] D77047: AArch64 SVE register infos and ptrace support

Muhammad Omair Javaid via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 21 04:17:33 PDT 2020

omjavaid marked 4 inline comments as done.
omjavaid added inline comments.

Comment at: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:1191
+          size_t vq = sve_vq_from_vl(m_sve_header.vl);
+          SetRegisterInfoMode(vq);
+          m_sve_ptrace_payload.resize(SVE_PT_SIZE(vq, SVE_PT_REGS_SVE));
SetRegisterInfoMode(vq); is getting called over here.

Comment at: lldb/source/Plugins/Process/Linux/NativeThreadLinux.h:42-43
   NativeRegisterContextLinux &GetRegisterContext() override {
+    if (m_reg_context_up && IsStopped(nullptr))
+      m_reg_context_up->ConfigureRegisterContext();
labath wrote:
> Why can't this work be done in the register context constructor? I believe we are always creating a Thread (and its reg context) while it is stopped...
ConfigureRegisterContext makes sure that sve register offsets and sizes are correctly updated and synced from ptrace on every stop. If SVE registers reconfigure themselves we ll have to update that information into our dynamic register infos array. Although for the context of this patch it assumes it will never change its register size during execution. But I will follow up patch that implements that behaviour.



More information about the lldb-commits mailing list