[Lldb-commits] [lldb] [lldb] Fix and speedup the `memory find` command (PR #104193)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 28 08:38:05 PDT 2024
================
@@ -79,3 +83,25 @@ def test_memory_find(self):
'memory find -s "nothere" `stringdata` `stringdata+10`',
substrs=["data not found within the range."],
)
+
+ @expectedFailureWindows
+ def test_memory_find_with_holes(self):
+ self._prepare_inferior()
+
+ self.runCmd("log enable gdb-remote packets")
+ self.runCmd("log enable lldb process target")
+
+ pagesize = self.frame().FindVariable("pagesize").GetValueAsUnsigned()
+ mem_with_holes = (
+ self.frame().FindVariable("mem_with_holes").GetValueAsUnsigned()
+ )
+ matches_var = self.frame().FindVariable("matches")
+ self.assertEqual(matches_var.GetNumChildren(), 4)
+ matches = [
+ f"data found at location: {matches_var.GetChildAtIndex(i).GetValueAsUnsigned():#x}"
+ for i in range(4)
+ ]
+ self.expect(
+ 'memory find -c 5 -s "needle" `mem_with_holes` `mem_with_holes+5*pagesize`',
----------------
labath wrote:
Done (the first part).
https://github.com/llvm/llvm-project/pull/104193
More information about the lldb-commits
mailing list