================ @@ -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`', ---------------- DavidSpickett wrote:
It would be a bit clearer if you used the expanded options names here. https://github.com/llvm/llvm-project/pull/104193 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits