[Lldb-commits] [lldb] [lldb][debugserver] Get the size of the shared cache in mapped VM (PR #187419)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 19 09:45:56 PDT 2026


https://github.com/jasonmolenda updated https://github.com/llvm/llvm-project/pull/187419

>From a5ea3a4f1c522f5e90fb424ba3facc6146ab2062 Mon Sep 17 00:00:00 2001
From: Jason Molenda <jmolenda at apple.com>
Date: Wed, 18 Mar 2026 17:37:38 -0700
Subject: [PATCH 1/3] [lldb][debugserver] Get the size of the shared cache in
 mapped VM

Fetch the size of the shared cache address range in VM in the
inferior process and return it, if possible.  This allows for a
simple call to DynamicLoader::GetSharedCacheInformation to get
the virtual address extent of the shared cache in the inferior.
---
 lldb/include/lldb/Target/DynamicLoader.h      | 10 ++--
 .../MacOSX-DYLD/DynamicLoaderDarwin.cpp       |  3 +-
 .../MacOSX-DYLD/DynamicLoaderMacOS.cpp        | 20 ++++++--
 .../MacOSX-DYLD/DynamicLoaderMacOS.h          | 12 ++---
 .../MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp   |  4 +-
 .../MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h     | 11 +++--
 .../ObjectFile/Mach-O/ObjectFileMachO.cpp     |  3 +-
 .../Platform/MacOSX/PlatformDarwin.cpp        |  3 +-
 .../debugserver/source/MacOSX/MachProcess.h   |  4 +-
 .../debugserver/source/MacOSX/MachProcess.mm  | 47 +++++++++++--------
 10 files changed, 72 insertions(+), 45 deletions(-)

diff --git a/lldb/include/lldb/Target/DynamicLoader.h b/lldb/include/lldb/Target/DynamicLoader.h
index d1d832f759748..784da7567fc4a 100644
--- a/lldb/include/lldb/Target/DynamicLoader.h
+++ b/lldb/include/lldb/Target/DynamicLoader.h
@@ -317,16 +317,16 @@ class DynamicLoader : public PluginInterface {
   /// \return
   ///     Returns false if this DynamicLoader cannot gather information
   ///     about the shared cache / has no concept of a shared cache.
-  virtual bool
-  GetSharedCacheInformation(lldb::addr_t &base_address, UUID &uuid,
-                            LazyBool &using_shared_cache,
-                            LazyBool &private_shared_cache,
-                            lldb_private::FileSpec &shared_cache_path) {
+  virtual bool GetSharedCacheInformation(
+      lldb::addr_t &base_address, UUID &uuid, LazyBool &using_shared_cache,
+      LazyBool &private_shared_cache, lldb_private::FileSpec &shared_cache_path,
+      std::optional<uint64_t> &size) {
     base_address = LLDB_INVALID_ADDRESS;
     uuid.Clear();
     using_shared_cache = eLazyBoolCalculate;
     private_shared_cache = eLazyBoolCalculate;
     shared_cache_path.Clear();
+    size.reset();
     return false;
   }
 
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
index f03e5bdf42768..474d908810e0e 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
@@ -142,10 +142,11 @@ ModuleSP DynamicLoaderDarwin::FindTargetModuleForImageInfo(
     LazyBool using_sc;
     LazyBool private_sc;
     FileSpec sc_path;
+    std::optional<uint64_t> size;
     SymbolSharedCacheUse sc_mode = ModuleList::GetGlobalModuleListProperties()
                                        .GetSharedCacheBinaryLoading();
     if (GetSharedCacheInformation(sc_base_addr, sc_uuid, using_sc, private_sc,
-                                  sc_path) &&
+                                  sc_path, size) &&
         sc_uuid) {
       if (module_spec.GetUUID())
         image_info = HostInfo::GetSharedCacheImageInfo(module_spec.GetUUID(),
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
index 56b46cc05bd97..feafa82c6eff4 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
@@ -691,11 +691,13 @@ Status DynamicLoaderMacOS::CanLoadImage() {
 
 bool DynamicLoaderMacOS::GetSharedCacheInformation(
     lldb::addr_t &base_address, UUID &uuid, LazyBool &using_shared_cache,
-    LazyBool &private_shared_cache, FileSpec &shared_cache_path) {
+    LazyBool &private_shared_cache, FileSpec &shared_cache_path,
+    std::optional<uint64_t> &size) {
   base_address = LLDB_INVALID_ADDRESS;
   uuid.Clear();
   using_shared_cache = eLazyBoolCalculate;
   private_shared_cache = eLazyBoolCalculate;
+  size.reset();
 
   if (m_process) {
     StructuredData::ObjectSP info = m_process->GetSharedCacheInfo();
@@ -704,9 +706,13 @@ bool DynamicLoaderMacOS::GetSharedCacheInformation(
       info_dict = info->GetAsDictionary();
     }
 
-    // {"shared_cache_base_address":140735683125248,"shared_cache_uuid
-    // ":"DDB8D70C-
-    // C9A2-3561-B2C8-BE48A4F33F96","no_shared_cache":false,"shared_cache_private_cache":false}
+    // { "shared_cache_base_address":6580879360,
+    //   "shared_cache_uuid":"71E62C65-D8D9-32D0-9A0B-7F5154C8049F",
+    //   "no_shared_cache":false,
+    //   "shared_cache_private_cache":false,
+    //   "shared_cache_path":"/S/V/P/C/OS/Sm/L/dyld/dyld_shared_cache_arm64e",
+    //   "shared_cache_size":6012010496
+    // }
 
     if (info_dict && info_dict->HasKey("shared_cache_uuid") &&
         info_dict->HasKey("no_shared_cache") &&
@@ -732,6 +738,12 @@ bool DynamicLoaderMacOS::GetSharedCacheInformation(
             info_dict->GetValueForKey("shared_cache_path")->GetStringValue();
         shared_cache_path.SetPath(filepath);
       }
+      if (info_dict->HasKey("shared_cache_size")) {
+        uint64_t val = info_dict->GetValueForKey("shared_cache_size")
+                           ->GetUnsignedIntegerValue(LLDB_INVALID_ADDRESS);
+        if (val != LLDB_INVALID_ADDRESS)
+          size = val;
+      }
       return true;
     }
   }
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h
index 9bb50de3eadb3..d40ca3f23dbc6 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h
@@ -54,12 +54,12 @@ class DynamicLoaderMacOS : public lldb_private::DynamicLoaderDarwin {
 
   lldb_private::Status CanLoadImage() override;
 
-  bool
-  GetSharedCacheInformation(lldb::addr_t &base_address,
-                            lldb_private::UUID &uuid,
-                            lldb_private::LazyBool &using_shared_cache,
-                            lldb_private::LazyBool &private_shared_cache,
-                            lldb_private::FileSpec &shared_cache_path) override;
+  bool GetSharedCacheInformation(lldb::addr_t &base_address,
+                                 lldb_private::UUID &uuid,
+                                 lldb_private::LazyBool &using_shared_cache,
+                                 lldb_private::LazyBool &private_shared_cache,
+                                 lldb_private::FileSpec &shared_cache_path,
+                                 std::optional<uint64_t> &size) override;
 
   // PluginInterface protocol
   llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index 1ec91548a1866..3246cffaa9e9d 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -1071,11 +1071,13 @@ Status DynamicLoaderMacOSXDYLD::CanLoadImage() {
 
 bool DynamicLoaderMacOSXDYLD::GetSharedCacheInformation(
     lldb::addr_t &base_address, UUID &uuid, LazyBool &using_shared_cache,
-    LazyBool &private_shared_cache, FileSpec &shared_cache_filepath) {
+    LazyBool &private_shared_cache, FileSpec &shared_cache_filepath,
+    std::optional<uint64_t> &size) {
   base_address = LLDB_INVALID_ADDRESS;
   uuid.Clear();
   using_shared_cache = eLazyBoolCalculate;
   private_shared_cache = eLazyBoolCalculate;
+  size.reset();
 
   if (m_process) {
     addr_t all_image_infos = m_process->GetImageInfoAddress();
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
index e3f263a08d7df..add4849b91b29 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
@@ -58,11 +58,12 @@ class DynamicLoaderMacOSXDYLD : public lldb_private::DynamicLoaderDarwin {
 
   lldb_private::Status CanLoadImage() override;
 
-  bool GetSharedCacheInformation(
-      lldb::addr_t &base_address, lldb_private::UUID &uuid,
-      lldb_private::LazyBool &using_shared_cache,
-      lldb_private::LazyBool &private_shared_cache,
-      lldb_private::FileSpec &shared_cache_filepath) override;
+  bool GetSharedCacheInformation(lldb::addr_t &base_address,
+                                 lldb_private::UUID &uuid,
+                                 lldb_private::LazyBool &using_shared_cache,
+                                 lldb_private::LazyBool &private_shared_cache,
+                                 lldb_private::FileSpec &shared_cache_filepath,
+                                 std::optional<uint64_t> &size) override;
 
   // PluginInterface protocol
   llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index b188c3f6964b2..eb792c768d137 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -5738,8 +5738,9 @@ void ObjectFileMachO::GetProcessSharedCacheUUID(Process *process,
     LazyBool using_shared_cache;
     LazyBool private_shared_cache;
     FileSpec sc_filepath;
+    std::optional<uint64_t> size;
     dl->GetSharedCacheInformation(base_addr, uuid, using_shared_cache,
-                                  private_shared_cache, sc_filepath);
+                                  private_shared_cache, sc_filepath, size);
   }
   Log *log(GetLog(LLDBLog::Symbols | LLDBLog::Process));
   LLDB_LOGF(
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index 2f2eed3359a93..36157cfa485d5 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -485,8 +485,9 @@ Status PlatformDarwin::GetModuleFromSharedCaches(
     UUID sc_uuid;
     LazyBool using_sc, private_sc;
     FileSpec sc_path;
+    std::optional<uint64_t> size;
     if (process->GetDynamicLoader()->GetSharedCacheInformation(
-            sc_base_addr, sc_uuid, using_sc, private_sc, sc_path)) {
+            sc_base_addr, sc_uuid, using_sc, private_sc, sc_path, size)) {
       if (module_spec.GetUUID())
         image_info = HostInfo::GetSharedCacheImageInfo(module_spec.GetUUID(),
                                                        sc_uuid, sc_mode);
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.h b/lldb/tools/debugserver/source/MacOSX/MachProcess.h
index 67b27b9902999..e4749f28106a6 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.h
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.h
@@ -285,7 +285,8 @@ class MachProcess {
                              bool fetch_report_load_commands);
   bool GetDebugserverSharedCacheInfo(uuid_t &uuid,
                                      std::string &shared_cache_path);
-  bool GetInferiorSharedCacheFilepath(std::string &inferior_sc_path);
+  bool GetInferiorSharedCacheFilepathAndSize(std::string &inferior_sc_path,
+                                             uint64_t &size);
   JSONGenerator::ObjectSP GetInferiorSharedCacheInfo(nub_process_t pid);
 
   nub_size_t GetNumThreads() const;
@@ -483,6 +484,7 @@ class MachProcess {
   void *(*m_dyld_process_snapshot_get_shared_cache)(void *snapshot);
   void (*m_dyld_shared_cache_for_each_file)(
       void *cache, void (^block)(const char *file_path));
+  uint64_t (*m_dyld_shared_cache_get_mapped_size)(void *cache);
   void (*m_dyld_process_snapshot_dispose)(void *snapshot);
   void (*m_dyld_process_dispose)(void *process);
   void (*m_dyld_process_info_for_each_image)(
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
index 10ed8045a9211..dce86d479bb7a 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -538,6 +538,7 @@ static bool FBSAddEventDataToOptions(NSMutableDictionary *options,
       m_dyld_process_snapshot_create_for_process(nullptr),
       m_dyld_process_snapshot_get_shared_cache(nullptr),
       m_dyld_shared_cache_for_each_file(nullptr),
+      m_dyld_shared_cache_get_mapped_size(nullptr),
       m_dyld_process_snapshot_dispose(nullptr), m_dyld_process_dispose(nullptr),
       m_dyld_process_info_for_each_image(nullptr),
       m_dyld_process_info_release(nullptr),
@@ -559,6 +560,8 @@ static bool FBSAddEventDataToOptions(NSMutableDictionary *options,
   m_dyld_shared_cache_for_each_file =
       (void (*)(void *, void (^)(const char *)))dlsym(
           RTLD_DEFAULT, "dyld_shared_cache_for_each_file");
+  m_dyld_shared_cache_get_mapped_size = (uint64_t(*)(void *))dlsym(
+      RTLD_DEFAULT, "dyld_shared_cache_get_mapped_size");
   m_dyld_process_snapshot_dispose =
       (void (*)(void *))dlsym(RTLD_DEFAULT, "dyld_process_snapshot_dispose");
   m_dyld_process_dispose =
@@ -1229,15 +1232,15 @@ static bool mach_header_validity_test(uint32_t magic, uint32_t cputype) {
   return false;
 }
 
-bool MachProcess::GetInferiorSharedCacheFilepath(
-    std::string &inferior_sc_path) {
+bool MachProcess::GetInferiorSharedCacheFilepathAndSize(
+    std::string &inferior_sc_path, uint64_t &size) {
   inferior_sc_path.clear();
 
   if (!m_dyld_process_create_for_task ||
       !m_dyld_process_snapshot_create_for_process ||
       !m_dyld_process_snapshot_get_shared_cache ||
       !m_dyld_shared_cache_for_each_file || !m_dyld_process_snapshot_dispose ||
-      !m_dyld_process_dispose)
+      !m_dyld_shared_cache_get_mapped_size || !m_dyld_process_dispose)
     return false;
 
   __block std::string sc_path;
@@ -1261,6 +1264,8 @@ static bool mach_header_validity_test(uint32_t magic, uint32_t cputype) {
     done = true;
     sc_path = path;
   });
+  size = m_dyld_shared_cache_get_mapped_size(cache);
+
   m_dyld_process_snapshot_dispose(snapshot);
   m_dyld_process_dispose(process);
 
@@ -1301,26 +1306,28 @@ static bool mach_header_validity_test(uint32_t magic, uint32_t cputype) {
     }
   }
 
-  // If debugserver and the inferior are have the same cache UUID,
-  // use the simple call to get the filepath to debugserver's shared
-  // cache, return that.
-  uuid_t debugserver_sc_uuid;
-  std::string debugserver_sc_path;
-  bool found_sc_filepath = false;
-  if (GetDebugserverSharedCacheInfo(debugserver_sc_uuid, debugserver_sc_path)) {
-    if (uuid_compare(inferior_sc_uuid, debugserver_sc_uuid) == 0 &&
-        !debugserver_sc_path.empty()) {
-      reply_sp->AddStringItem("shared_cache_path", debugserver_sc_path);
-      found_sc_filepath = true;
-    }
-  }
 
   // Use SPI that are only available on newer OSes to fetch the
   // filepath of the shared cache of the inferior, if available.
-  if (!found_sc_filepath) {
-    std::string inferior_sc_path;
-    if (GetInferiorSharedCacheFilepath(inferior_sc_path))
-      reply_sp->AddStringItem("shared_cache_path", inferior_sc_path);
+  std::string inferior_sc_path;
+  uint64_t size;
+  if (GetInferiorSharedCacheFilepathAndSize(inferior_sc_path, size)) {
+    reply_sp->AddStringItem("shared_cache_path", inferior_sc_path);
+    reply_sp->AddIntegerItem("shared_cache_size", size);
+  } else {
+    // If debugserver and the inferior are have the same cache UUID,
+    // use the simple call to get the filepath to debugserver's shared
+    // cache, return that.  Can't get the shared cache size this way,
+    // currently.
+    uuid_t debugserver_sc_uuid;
+    std::string debugserver_sc_path;
+    if (GetDebugserverSharedCacheInfo(debugserver_sc_uuid,
+                                      debugserver_sc_path)) {
+      if (uuid_compare(inferior_sc_uuid, debugserver_sc_uuid) == 0 &&
+          !debugserver_sc_path.empty()) {
+        reply_sp->AddStringItem("shared_cache_path", debugserver_sc_path);
+      }
+    }
   }
 
   return reply_sp;

>From eed22986aee40fe5df0483e4dca02981c87ff4db Mon Sep 17 00:00:00 2001
From: Jason Molenda <jmolenda at apple.com>
Date: Wed, 18 Mar 2026 21:26:27 -0700
Subject: [PATCH 2/3] Add an API test which checks that printf is within the
 address range of the shared cache.

---
 .../API/macosx/shared-cache-vm-range/Makefile |  4 ++
 .../TestSharedCacheVMRange.py                 | 52 +++++++++++++++++++
 .../API/macosx/shared-cache-vm-range/main.c   |  4 ++
 3 files changed, 60 insertions(+)
 create mode 100644 lldb/test/API/macosx/shared-cache-vm-range/Makefile
 create mode 100644 lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py
 create mode 100644 lldb/test/API/macosx/shared-cache-vm-range/main.c

diff --git a/lldb/test/API/macosx/shared-cache-vm-range/Makefile b/lldb/test/API/macosx/shared-cache-vm-range/Makefile
new file mode 100644
index 0000000000000..4774d1d781b3c
--- /dev/null
+++ b/lldb/test/API/macosx/shared-cache-vm-range/Makefile
@@ -0,0 +1,4 @@
+C_SOURCES := main.c
+MAKE_DSYM := NO
+
+include Makefile.rules
diff --git a/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py b/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py
new file mode 100644
index 0000000000000..b13cfa64fc63a
--- /dev/null
+++ b/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py
@@ -0,0 +1,52 @@
+"""
+Test that we can get the vm range of the shared cache.
+"""
+
+import lldb
+import re
+import json
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class SharedCacheVMRangeTestCase(TestBase):
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIfRemote
+    @skipUnlessDarwin
+    @skipIfOutOfTreeDebugserver  # debugserver returns shared_cache_size
+    def test_shared_cache_vm_range(self):
+        """Test that the shared cache VM range contains a known libc function"""
+        self.build()
+        target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
+            self, "// break here", lldb.SBFileSpec("main.c")
+        )
+
+        res = lldb.SBCommandReturnObject()
+        ci = self.dbg.GetCommandInterpreter()
+        self.assertTrue(ci, VALID_COMMAND_INTERPRETER)
+
+        ci.HandleCommand("process plugin packet send jGetSharedCacheInfo:{}", res)
+
+        # 'packet: jGetSharedCacheInfo:{} response: {"shared_cache_base_address":6572900352,"shared_cache_uuid":"674DB25A-34B2-3C56-8BD4-7D78005B2F2E","no_shared_cache":false,"shared_cache_private_cache":false,"shared_cache_path":"/System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e","shared_cache_size":5820792832}'
+
+        self.assertTrue("response: " in res.GetOutput())
+        response = re.search("response: (.+)", res.GetOutput()).group(1)
+        json_response = json.loads(response)
+        self.assertTrue("shared_cache_base_address" in json_response)
+        self.assertTrue("shared_cache_size" in json_response)
+        start = json_response["shared_cache_base_address"]
+        end = start + json_response["shared_cache_size"]
+
+        symctx_list = target.FindSymbols("printf", lldb.eSymbolTypeCode)
+        self.assertGreater(symctx_list.GetSize(), 0)
+
+        symctx = symctx_list.GetContextAtIndex(0)
+        sym = symctx.GetSymbol()
+        self.assertTrue(sym.IsValid())
+        addr = sym.GetStartAddress()
+        load_addr = addr.GetLoadAddress(target)
+
+        self.assertGreater(load_addr, start)
+        self.assertLess(load_addr, end)
diff --git a/lldb/test/API/macosx/shared-cache-vm-range/main.c b/lldb/test/API/macosx/shared-cache-vm-range/main.c
new file mode 100644
index 0000000000000..12e89ee6722ea
--- /dev/null
+++ b/lldb/test/API/macosx/shared-cache-vm-range/main.c
@@ -0,0 +1,4 @@
+#include <stdio.h>
+int main() {
+  printf("hi\n"); // break here
+}

>From 0fd71f94e0b8ca864804baed26b551914d849523 Mon Sep 17 00:00:00 2001
From: Jason Molenda <github-mail at molenda.com>
Date: Thu, 19 Mar 2026 09:45:46 -0700
Subject: [PATCH 3/3] Update
 lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py

Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>
---
 .../shared-cache-vm-range/TestSharedCacheVMRange.py   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py b/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py
index b13cfa64fc63a..811a4dab63c2f 100644
--- a/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py
+++ b/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py
@@ -29,7 +29,16 @@ def test_shared_cache_vm_range(self):
 
         ci.HandleCommand("process plugin packet send jGetSharedCacheInfo:{}", res)
 
-        # 'packet: jGetSharedCacheInfo:{} response: {"shared_cache_base_address":6572900352,"shared_cache_uuid":"674DB25A-34B2-3C56-8BD4-7D78005B2F2E","no_shared_cache":false,"shared_cache_private_cache":false,"shared_cache_path":"/System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e","shared_cache_size":5820792832}'
+        # packet: jGetSharedCacheInfo:{} 
+        # response: 
+        # {
+        #   "shared_cache_base_address": 6572900352,
+        #   "shared_cache_uuid": "674DB25A-34B2-3C56-8BD4-7D78005B2F2E",
+        #   "no_shared_cache": false,
+        #   "shared_cache_private_cache": false,
+        #   "shared_cache_path": "/System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e",
+        #   "shared_cache_size": 5820792832
+        # }
 
         self.assertTrue("response: " in res.GetOutput())
         response = re.search("response: (.+)", res.GetOutput()).group(1)



More information about the lldb-commits mailing list