[Lldb-commits] [lldb] [lldb] Implement ProcessGDBRemote support for ReadMemoryRanges (PR #164311)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 21 03:39:44 PDT 2025
================
@@ -45,3 +45,26 @@ def test_NSError_p(self):
],
)
self.runCmd("process continue")
+
+ @skipIfOutOfTreeDebugserver
+ def test_runtime_types_efficient_memreads(self):
+ # Test that we use an efficient reading of memory when reading
+ # Objective-C method descriptions.
+ logfile = os.path.join(self.getBuildDir(), "log.txt")
+ self.runCmd(f"log enable -f {logfile} gdb-remote packets process")
+ self.addTearDownHook(lambda: self.runCmd("log disable gdb-remote packets"))
+
+ self.build()
+ self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
+ self, "// Break here for NSString tests", lldb.SBFileSpec("main.m", False)
+ )
+
+ self.runCmd(f"proc plugin packet send StartTesting", check=False)
+ self.expect('expression str = [NSString stringWithCString: "new"]')
+ self.runCmd(f"proc plugin packet send EndTesting", check=False)
+
+ self.assertTrue(os.path.exists(logfile))
+ log_text = open(logfile).read()
+ log_text = log_text.split("StartTesting", 1)[-1].split("EndTesting", 1)[0]
+ self.assertIn("MultiMemRead:", log_text)
----------------
DavidSpickett wrote:
Also assert that it is in there one or N times whatever is correct.
https://github.com/llvm/llvm-project/pull/164311
More information about the lldb-commits
mailing list