[Lldb-commits] [lldb] [lldb] Add SBProcess methods for get/set/use address masks (PR #83095)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 29 14:04:39 PST 2024


================
@@ -1255,6 +1255,95 @@ lldb::SBFileSpec SBProcess::GetCoreFile() {
   return SBFileSpec(core_file);
 }
 
+addr_t SBProcess::GetAddressMask(AddressMaskType type,
+                                 AddressMaskRange addr_range) {
+  LLDB_INSTRUMENT_VA(this, type, addr_range);
+  addr_t default_mask = 0;
----------------
jasonmolenda wrote:

A mask value of 0 would be an invalid address mask -- no bits are used for addressing.  The variable name "default_mask" was a poor choice.  But explicitly returning LLDB_INVALID_ADDRESS_MASK if we don't find any value might be the correct choice, it would mean you passed an invalid enum argument (or the SBProcess can't access its Process)

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


More information about the lldb-commits mailing list