[Lldb-commits] [PATCH] D142792: Add SBValue::GetValueAsAddress(), strip off ptrauth, TBI, MTE bits on AArch64 systems
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 27 16:54:37 PST 2023
JDevlieghere added inline comments.
================
Comment at: lldb/source/API/SBValue.cpp:935-940
+ ProcessSP process_sp = m_opaque_sp->GetProcessSP();
+ if (!process_sp)
+ return ret_val;
+ ABISP abi_sp = process_sp->GetABI();
+ if (abi_sp)
+ return abi_sp->FixCodeAddress(ret_val);
----------------
jasonmolenda wrote:
> JDevlieghere wrote:
> > Nit^3: why not do the same as in `GetStrippedPointerValue` and `CreateValueObjectFromAddress`:
> >
> > ```
> > if (ProcessSP process_sp = m_opaque_sp->GetProcessSP())
> > if (ABISP abi_sp = process_sp->GetABI())
> > return abi_sp->FixCodeAddress(ret_val);
> > ```
> This method is static so I had to duplicate the functionality here. :/
I meant the code style rather than the actual code, but yeah good point maybe this should be a helper ;-)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142792/new/
https://reviews.llvm.org/D142792
More information about the lldb-commits
mailing list