summaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api/find_in_memory
AgeCommit message (Collapse)Author
2025-08-13[lldb][test] Make TestFindRangesInMemory.py more robust (#152817)Igor Kudrin
`GetHeapRanges()` could return two overlapping ranges because it did not check whether `heap_pointer1` lies within the range returned for `heap_pointer2`. This could result in a test failure in `test_find_ranges_in_memory_two_matches` when `process.FindRangesInMemory()` returned 3 instead of 2. The patch ensures that `GetHeapRanges()` returns either two non-overlapping ranges or one range covering both heap pointers. The issue was probably introduced in #111951
2025-06-23[lldb] Fix SBMemoryRegionInfoListExtensions iter to yield unique refe… ↵Zyn
(#144815)
2024-12-03Make SBMemoryRegionInfoList iterable with Python SWIG (#117358)Luke Riddle
This PR fixes a simple SWIG issue with SBMemoryRegionInfoList not being iterable out-of-the-box. This is mostly because of limitations to the `lldb_iter` function, which doesn't allow for specifying arguments to the size / iter functions passed. Before: ``` (lldb) script Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. >>> for region in lldb.process.GetMemoryRegions(): ... print(region) ... Traceback (most recent call last): File "<console>", line 1, in <module> File "/opt/llvm/stable/Toolchains/llvm-sand.xctoolchain/usr/lib/python3.10/site-packages/lldb/__init__.py", line 114, in lldb_iter yield elem(i) TypeError: SBMemoryRegionInfoList.GetMemoryRegionAtIndex() missing 1 required positional argument: 'region_info' ``` After: ``` (lldb) script Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. >>> for region in lldb.process.GetMemoryRegions(): ... print(region) ... [0x0000000000200000-0x00000000002cf000 R--] [0x00000000002cf000-0x0000000000597000 R-X] [0x0000000000597000-0x00000000005ad000 R--] [0x00000000005ad000-0x00000000005b1000 RW-] [0x00000000005b1000-0x0000000000b68000 RW-] [0x000000007fff7000-0x000000008fff7000 RW-] [0x000002008fff7000-0x000010007fff8000 RW-] [0x0000503000000000-0x0000503000010000 RW-] [0x0000503e00000000-0x0000503e00010000 RW-] [0x0000504000000000-0x0000504000010000 RW-] [0x0000504e00000000-0x0000504e00010000 RW-] [0x000050d000000000-0x000050d000010000 RW-] [0x000050de00000000-0x000050de00010000 RW-] [0x000050e000000000-0x000050e000010000 RW-] [0x000050ee00000000-0x000050ee00010000 RW-] [0x0000511000000000-0x0000511000010000 RW-] [0x0000511e00000000-0x0000511e00010000 RW-] [0x0000513000000000-0x0000513000010000 RW-] ... ```
2024-10-18[lldb] Speed up FindInMemory tests (#111951)Igor Kudrin
A memory region can be relatively large. Searching for a value in the entire region is time-consuming, especially when running tests against a remote target, because the memory data is transferred in small chunks over a relatively slow GDB Remote Protocol. The patch limits the address range to be searched to 2K, which seems sufficient for these tests. In my setup, for local runs, these tests now take half the time they did before the patch. For a remote target, the improvement is even more significant.
2024-06-24[lldb][API] Add Find(Ranges)InMemory() to Process SB API (#96569)Miro Bucko
This is a second attempt to land #95007 Test Plan: llvm-lit llvm-project/lldb/test/API/python_api/find_in_memory/TestFindInMemory.py llvm-project/lldb/test/API/python_api/find_in_memory/TestFindRangesInMemory.py Reviewers: clayborg Tasks: lldb
2024-06-24Revert commits that add `TestFind(Ranges)InMemory.py` (#96560)Chelsea Cassanova
Reverting to unblock macOS buildbots which are currently failing on these tests. https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/6377/
2024-06-24[lldb] Fix failing TestFind(Ranges)InMemory.py tests. (#96511)Miro Bucko
This is to unblock #95007. Will investigate why the assertion is failing on some arch.
2024-06-24[lldb][API] Add Find(Ranges)InMemory() to Process SB API (#95007)Miro Bucko
Test Plan: llvm-lit llvm-project/lldb/test/API/python_api/find_in_memory/TestFindInMemory.py llvm-project/lldb/test/API/python_api/find_in_memory/TestFindRangesInMemory.py Reviewers: clayborg Tasks: lldb