[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
Tue Feb 14 15:38:05 PST 2023


jasonmolenda updated this revision to Diff 497461.
jasonmolenda added a comment.

Updated patch to address David's feedback.  Thanks David!

Updated comments and SB API doc to conform to English.  Not decided on whether we should use FixCodeAddress for our strippings here; the difference between Data & Code didn't come up with the Darwin design.  Fixed code in ValueObjectPrinter to correctly append `actual=`.  Added a test for `actual=` from the SBValue description to the test case.  Limited the test case to Darwin & Linux systems.

In further testing, my formatter in ValueObject.cpp is not limited to pointers now.  e.g. I have an intptr_t scratch variable and it formats as

  (lldb) v scratch
  (intptr_t) scratch = 0x3000000100008000 (actual=0x100008000)

this `actual=` text should only be appended for a ValueObject that is a pointer type; I don't want this shown for non-pointer types like a uint64_t, that's a bug.  I need to fix this & update the patch once more.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142792

Files:
  lldb/bindings/interface/SBValue.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.497461.patch
Type: text/x-patch
Size: 9052 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230214/f075e6f6/attachment-0001.bin>


More information about the lldb-commits mailing list