[Lldb-commits] [lldb] [lldb/Interpreter] Let a Scripted Process report its addressable bits (PR #224701)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 22 18:03:15 PDT 2026


medismailben wrote:

> It seems weird that the addressable bits are something the scripted process reports, as that's already a property of the process. Based on the description, it sounds like the problem is that you need to know before you do the launch. Previously, I believe you solved that problem by storing that information in the metadata. Why can't we do the same here? The current solution seems somewhat confusing. Does a ScriptedProcess instance always use the value returned by the scripted process implementation. Based on the PR, it seems like the answer is no, and this is just a way to query it before using the "real" process machine. Creating a duplicate way to store/report this seems fragile.

Each process plugin have a different way to advertise addressable bits: `ProcessGDBRemote` uses `qHostInfo` packet, `ProcessMachCore` by reading the `LC_NOTE "addrable bits"` payload, so to me it seems very reasonable to have a scriptable way of doing that from the ScriptedProcess itself. `get_process_metadata` is used for another purpose, more specifically with extended backtraces to include Application Specific Information from crash reports, I don't think it would have been a good fit for addressable bit mask. So if a scripted process advertises addressable bits through this new API, the frame will use that value for the mask. Now, there is still another issue that affect all process plugins: if the user decides to manually set a new value for the addressable bits, either through the setting or through the SBAPI, nothing recomputes the frame PC with the new value. #224989 address this second issue.

https://github.com/llvm/llvm-project/pull/224701


More information about the lldb-commits mailing list