[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 27 15:30:12 PDT 2023


jasonmolenda added inline comments.


================
Comment at: lldb/source/API/SBProcess.cpp:1260-1261
+      return process_sp->GetHighmemDataAddressMask();
+    case eMaskTypeAny:
+      return process_sp->GetDataAddressMask();
+    }
----------------
jasonmolenda wrote:
> clayborg wrote:
> > Any reason we actually have a case for eMaskTypeAny? What makes this useful?
> We have 4 different masks because of Linux's design, and because I have an internal customer doing different page table layouts for high & low memory in the same process (sigh), but realistically 99% of our programs are going to have the same mask for all 4 types.  Making an SB API user choose which mask they want of the four makes it harder to use, imo.  The folks doing genuinely unusual things, like the internal customer I have using high & low memory with different page table setups, can jump through the hoops of getting the different masks.
Just to be clear:  I expect any SB API user who is using these is always going to call `SBProcess::SetAddressMask(lldb.eMaskTypeAll, mask)` and `SBProcess::GetAddressMask(lldb.eMaskTypeAny)`.  Maybe some day we'll support a target where code & data masks are necessarily different and this simplification will be a problem for SB API users, but today I think they are fine with doing simply this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155905



More information about the lldb-commits mailing list