<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/API/python_api/find_in_memory, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb][test] Make TestFindRangesInMemory.py more robust (#152817)</title>
<updated>2025-08-13T21:15:45+00:00</updated>
<author>
<name>Igor Kudrin</name>
<email>ikudrin@accesssoftek.com</email>
</author>
<published>2025-08-13T21:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=36c2a6696853020ffc0072566b1f5e77efe96d0c'/>
<id>36c2a6696853020ffc0072566b1f5e77efe96d0c</id>
<content type='text'>
`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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`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</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix SBMemoryRegionInfoListExtensions iter to yield unique refe… (#144815)</title>
<updated>2025-06-23T18:02:51+00:00</updated>
<author>
<name>Zyn</name>
<email>103019185+zyn-li@users.noreply.github.com</email>
</author>
<published>2025-06-23T18:02:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ff865b639af05e366b108c7acb034e3d0e069376'/>
<id>ff865b639af05e366b108c7acb034e3d0e069376</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make SBMemoryRegionInfoList iterable with Python SWIG (#117358)</title>
<updated>2024-12-03T18:29:12+00:00</updated>
<author>
<name>Luke Riddle</name>
<email>35970909+lukejriddle@users.noreply.github.com</email>
</author>
<published>2024-12-03T18:29:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2a1a02461a8d4ae9f560a4215fe85a1f085b4d82'/>
<id>2a1a02461a8d4ae9f560a4215fe85a1f085b4d82</id>
<content type='text'>
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.
&gt;&gt;&gt; for region in lldb.process.GetMemoryRegions():
...   print(region)
...
Traceback (most recent call last):
  File "&lt;console&gt;", line 1, in &lt;module&gt;
  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.
&gt;&gt;&gt; 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-]
...
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
&gt;&gt;&gt; for region in lldb.process.GetMemoryRegions():
...   print(region)
...
Traceback (most recent call last):
  File "&lt;console&gt;", line 1, in &lt;module&gt;
  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.
&gt;&gt;&gt; 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-]
...
```</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Speed up FindInMemory tests (#111951)</title>
<updated>2024-10-18T21:13:27+00:00</updated>
<author>
<name>Igor Kudrin</name>
<email>ikudrin@accesssoftek.com</email>
</author>
<published>2024-10-18T21:13:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b88d94caba518bc63c25fe476c4de3d9b0bbd2c0'/>
<id>b88d94caba518bc63c25fe476c4de3d9b0bbd2c0</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][API] Add Find(Ranges)InMemory() to Process SB API (#96569)</title>
<updated>2024-06-24T22:51:12+00:00</updated>
<author>
<name>Miro Bucko</name>
<email>mbucko@meta.com</email>
</author>
<published>2024-06-24T22:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0d4da0df166ea7512c6e97e182b21cd706293eaa'/>
<id>0d4da0df166ea7512c6e97e182b21cd706293eaa</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>Revert commits that add `TestFind(Ranges)InMemory.py` (#96560)</title>
<updated>2024-06-24T22:12:49+00:00</updated>
<author>
<name>Chelsea Cassanova</name>
<email>chelsea_cassanova@apple.com</email>
</author>
<published>2024-06-24T22:12:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a32b7199f0c15ea1c6c9490b6166c019c9d4bd2b'/>
<id>a32b7199f0c15ea1c6c9490b6166c019c9d4bd2b</id>
<content type='text'>
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/</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix failing TestFind(Ranges)InMemory.py tests. (#96511)</title>
<updated>2024-06-24T18:38:05+00:00</updated>
<author>
<name>Miro Bucko</name>
<email>mbucko@meta.com</email>
</author>
<published>2024-06-24T18:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=33a9c57b89c3ea901a057c3fcc9c9160eaf5a625'/>
<id>33a9c57b89c3ea901a057c3fcc9c9160eaf5a625</id>
<content type='text'>
This is to unblock #95007. Will investigate why the assertion is failing
on some arch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is to unblock #95007. Will investigate why the assertion is failing
on some arch.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][API] Add Find(Ranges)InMemory() to Process SB API (#95007)</title>
<updated>2024-06-24T15:06:20+00:00</updated>
<author>
<name>Miro Bucko</name>
<email>mbucko@meta.com</email>
</author>
<published>2024-06-24T15:06:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=10bd5ad0a133fe73ffc1b05e63bc3fb2d56ba79c'/>
<id>10bd5ad0a133fe73ffc1b05e63bc3fb2d56ba79c</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
</feed>
