[Lldb-commits] [PATCH] D156687: [lldb][AArch64] Add kind marker to ReadAll/WriteALLRegisterValues data
Muhammad Omair Javaid via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 1 07:26:46 PDT 2023
omjavaid added inline comments.
================
Comment at: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:539
Status error;
- uint32_t reg_data_byte_size = GetGPRBufferSize();
+ uint32_t reg_data_byte_size = sizeof(SavedRegistersKind) + GetGPRBufferSize();
error = ReadGPR();
----------------
Now that we are trying to make both Read and Write look similar lets pull out size calculation into a separate helper function.
================
Comment at: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:577
if (GetRegisterInfo().IsSVEEnabled() || GetRegisterInfo().IsSSVEEnabled()) {
- *dst = static_cast<uint8_t>(m_sve_state);
+ dst = AddSavedRegistersKind(dst, SavedRegistersKind::SVE);
+ *(reinterpret_cast<SVEState *>(dst)) = m_sve_state;
----------------
Another point that just came to my mind is the kind terminology used here. In LLDB we differentiate registers into kinds example: LLDB kinds, DWARF kinds. For differentiating between register in this an appropraite term would be "register set". So lets rename this to SaveRegisterSet/RestoreRegisterSet.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156687/new/
https://reviews.llvm.org/D156687
More information about the lldb-commits
mailing list