Add SBValue::GetValueAsAddress API for removing non-addressing metadata
authorJason Molenda <jason@molenda.com>
Thu, 2 Mar 2023 21:28:34 +0000 (13:28 -0800)
committerJason Molenda <jason@molenda.com>
Thu, 2 Mar 2023 21:32:37 +0000 (13:32 -0800)
commit4d635be2dbadc77522eddc9668697385a3b9f8b4
tree418205e4425ed98f7b4ce8f224ee2bf5df759cbc
parent2010269c0f4694d68f3c9a87971049f4586bb940
Add SBValue::GetValueAsAddress API for removing non-addressing metadata

On target where metadata is stored in bits that aren't used for
virtual addressing -- AArch64 Top Byte Ignore and pointer authentication
are two examples -- an SBValue object representing a pointer will
return the address with metadata for SBValue::GetValueAsUnsigned.
Users may want to get the virtual address without the metadata;
this new method gives them a way to do this.

Differential Revision: https://reviews.llvm.org/D142792
lldb/bindings/interface/SBValueDocstrings.i
lldb/include/lldb/API/SBValue.h
lldb/include/lldb/Core/ValueObject.h
lldb/source/API/SBValue.cpp
lldb/source/Core/ValueObject.cpp
lldb/source/DataFormatters/ValueObjectPrinter.cpp
lldb/test/API/api/clear-sbvalue-nonadressable-bits/Makefile [new file with mode: 0644]
lldb/test/API/api/clear-sbvalue-nonadressable-bits/TestClearSBValueNonAddressableBits.py [new file with mode: 0644]
lldb/test/API/api/clear-sbvalue-nonadressable-bits/main.c [new file with mode: 0644]