[Lldb-commits] [lldb] [lldb/Interpreter] Read Scripted Process addressable bits from its metadata (PR #227515)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 1 16:59:58 PDT 2026


================
@@ -198,15 +198,19 @@ void ScriptedProcess::DidLaunch() { DidLaunchOrAttach(); }
 void ScriptedProcess::DidLaunchOrAttach() {
   m_pid = GetInterface().GetProcessID();
 
-  StructuredData::DictionarySP bits_sp = GetInterface().GetAddressableBits();
-  if (!bits_sp)
+  // The addressable bits are optional: without them, the process keeps the
+  // masks it inherits from the target.
+  StructuredData::DictionarySP metadata_sp = GetInterface().GetMetadata();
+  StructuredData::Dictionary *bits = nullptr;
+  if (!metadata_sp ||
+      !metadata_sp->GetValueForKeyAsDictionary("addressable_bits", bits))
     return;
 
   AddressableBits addressable_bits;
   uint64_t num_bits = 0;
-  if (bits_sp->GetValueForKeyAsInteger("lowmem", num_bits))
+  if (bits->GetValueForKeyAsInteger("lowmem", num_bits))
     addressable_bits.SetLowmemAddressableBits(num_bits);
----------------
medismailben wrote:

We could but `Process::SetAddressableBitMasks` does that already.

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


More information about the lldb-commits mailing list