omjavaid added inline comments.

================
Comment at: 
lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp:767
+      m_reg_data.Clear();
+      m_reg_data.SetData(reg_data_sp);
+      m_reg_data.SetByteOrder(GetByteOrder());
----------------
jasonmolenda wrote:
> I'm probably not following this correctly, but isn't this going to shorten 
> the register buffer m_reg_data to the end of the SVE registers in the buffer, 
> right?  If the goal here is to create a heap object, why not just copy the 
> entire m_data_reg?  If someone ever adds a register past the SVE's, this 
> would truncate it away.  
Register data can expand on shrink based on vector length update of SVE 
register set. So heap size will change accordingly.
We need to preserve VG register and GPRs from current register data so we copy 
the whole data in case vector length update caused register data to expand. 
However we truncate data to new vector length in case vector length has shrunk. 
All register past VG registers are invalidated anyways. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82863/new/

https://reviews.llvm.org/D82863

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to