This patch adds GetByteOffset to SBValue interface for accessing register offset from register infos. This was needed to write tests to verify that AArch64 register sizes and offsets are updated when a thread updates vector granule register vg. A follow up test will make use of this API to test LLDB SVE register in multithreaded mode with dynamic update of size and offset.
The new API looks fairly confusing. This doesn't sound like something that the SB users should generally know or care about. What would the GetByteOffset function return in the generic case?
I don't find the explanation in the summary convincing. Presumably, you should be able to verify the proper behavior by checking the data (and its size) that the SBValue object holds. If that returns the right thing, who cares about the value of the offset field?
This was something which helped during development so I thought about implementing tests based on this but as you highlighted I wasnt sure if there is a proper client for this API function. I am gonna abandon this change and have updated test implementation removed dependence on GetByteOffset.
Sounds good. FWIW, I wouldn't be opposed to some CLI command which would dump some low-level details of the register context, similar to how we have the "target modules dump" command tree for Module objects...