[Lldb-commits] [lldb] [lldb] Be conversative about setting highmem address masks (PR #90533)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed May 1 14:07:08 PDT 2024


================
@@ -1465,6 +1465,20 @@ class Process : public std::enable_shared_from_this<Process>,
   /// platforms where there is a difference (only Arm Thumb at this time).
   lldb::addr_t FixAnyAddress(lldb::addr_t pc);
 
+  /// Retrieve the actual address masks for high memory code/data,
+  /// without the normal fallbacks of returning the low-memory masks
+  /// or the user settings.  Needed by SBProcess to determine if
+  /// the high address masks have actually been set, and should
+  /// be updated when "set all masks" is requested.  In most cases,
+  /// the highmem masks should be left to have LLDB_INVALID_ADDRESS_MASK,
+  /// unset.
+  lldb::addr_t GetConcreteHighmemCodeAddressMask() {
----------------
jasonmolenda wrote:

Yeah this is a weird API I almost thought to make it a protected method because the only user should be SBFrame where we need to distinguish between the "currently in-effect high memory mask" and "the current Process mask setting, which may be unset".  For the effective high memory mask, if the user hasn't specified a high memory addressable bits setting, and the process doesn't have a mask set, then we are in a "one-mask-for-all-addresses" mode and we return the low memory address mask.

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


More information about the lldb-commits mailing list