[Lldb-commits] [PATCH] D155905: lldb RFC: Exposing set/get address masks, Fix*Address methods in SBProcess
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 20 18:05:31 PDT 2023
jasonmolenda created this revision.
jasonmolenda added reviewers: DavidSpickett, jingham, clayborg.
jasonmolenda added a project: LLDB.
Herald added subscribers: JDevlieghere, kristof.beyls.
Herald added a project: All.
jasonmolenda requested review of this revision.
Herald added a subscriber: lldb-commits.
We've had a few people doing SB API scripting who have asked for access to the Process settings of address masks, and API to fix address+metadata down to just addressable memory.
We're mostly focused on AArch64 these days at Apple so the number of addressing bits is what everyone is really asking for, but given that Linux's native representation is an address mask which can express things number-of-bits cannot, the SB API needs to represent that way, I think.
I'm also including the "Highmem" variants here, which makes for a not great looking SB API additions, but I know someone is going to need it. I'm open to suggestions or rejections of including this. There is an environment I need to support where they have items in both high and low memory (in the same execution level) with different page table settings for both so they have different numbers of addressing bits for low and high memory. This is quite uncommon I think -- if you have code running in high and low memory simultaneously, it's usually a kernel in high memory at EL1 and userland in low memory at EL0 and on Darwin they run with the same page table setups.
For the internal Process API, I didn't mind having these separate Highmem accessors which only differed from the base ones when we're in this situation of low & high memory on AArch64 having different page table setups. The only user of this is the Apple AArch64 ABI plugin when fixing addresses, so it wasn't something most people needed to consider. But putting it in SBProcess, it locks the API down more.
Adding Fix*Address is obvious.
No tests written yet, I didn't want to get ahead of myself. Given that I can get / set the address masks with these API, it will be easy enough to mutate it, run some uint64_t's through the Fix*Address API and confirm they're modified.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155905
Files:
lldb/include/lldb/API/SBProcess.h
lldb/source/API/SBProcess.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155905.542729.patch
Type: text/x-patch
Size: 5486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230721/296988e1/attachment.bin>
More information about the lldb-commits
mailing list