[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 1 10:43:42 PST 2023
jasonmolenda updated this revision to Diff 501574.
jasonmolenda added a comment.
Clean up the test case - the C file and python file - to address David's feedback and test it more thoroughly. Fix `ValueObjectPrinter::PrintValueAndSummaryIfNeeded()` to only add the `actual=hex` if this is a pointer type. I think we're all done with this one.
The test file now creates three variables, a pointer to a stack, a pointer to a global, and a function pointer, with TBI bits and without. e.g.
runCmd: frame variable
output: (int) count = 5
(int *) count_p = 0x000000016fdff258
(intptr_t) scratch = 3458764518115524608
(int *) count_invalid_p = 0x300000016fdff258 (actual=0x16fdff258)
(int (*)(...)) main_p = 0x0000000100003f28 (a.out`main at main.c:5)
(int (*)(...)) main_invalid_p = 0x3000000100003f28 (actual=0x100003f28) (a.out`main at main.c:5)
(int *) global_p = 0x0000000100004000
(int *) global_invalid_p = 0x3000000100004000 (actual=0x100004000)
We're not printing the symbol name for the `global_p` and `global_invalid_p` - this is unrelated to TBI, I might look into that later, whether it should print the name of the symbol here in the description.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142792/new/
https://reviews.llvm.org/D142792
Files:
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
lldb/test/API/api/clear-sbvalue-nonadressable-bits/TestClearSBValueNonAddressableBits.py
lldb/test/API/api/clear-sbvalue-nonadressable-bits/main.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142792.501574.patch
Type: text/x-patch
Size: 10302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230301/c5add8f2/attachment-0001.bin>
More information about the lldb-commits
mailing list