[Lldb-commits] [lldb] [lldb] Add a MemoryRegionInfo cache at a process stop (PR #202509)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 22 01:07:51 PDT 2026


================
@@ -0,0 +1,78 @@
+"""
+Test that memory region info results are cached.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class MemoryRegionInfoPacketsCached(TestBase):
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_cached_packets(self):
+        """Test that qMemoryRegionInfo packets are cached."""
+        logfile = os.path.join(self.getBuildDir(), "log.txt")
+        self.runCmd(f"log enable -f {logfile} gdb-remote packets")
+        self.build()
+        main_source_spec = lldb.SBFileSpec("main.cpp")
+        (
+            target,
+            process,
+            _,
+            _,
+        ) = lldbutil.run_to_source_breakpoint(
+            self, "break", main_source_spec, only_one_thread=False
----------------
jasonmolenda wrote:

I restructured the test to fire up 4 threads.  The first thread does a sleep(1), then hits a breakpoints.  The other threads run directly to a sleep(100) and sit there.  The goal is to have some amount of stack frames on all four threads at the point where we hit the breakpoint.  It should do that reliably enough now. 

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


More information about the lldb-commits mailing list