Skip to content

Commit 9abe2bf

Browse files
committed
Add a doc string to sbprocess to show MemoryRegions is iterable
1 parent 6a97897 commit 9abe2bf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lldb/bindings/interface/SBProcessDocstrings.i

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,14 @@ SBProcess supports thread iteration. For example (from test/lldbutil.py), ::
258258
Deallocates the block of memory (previously allocated using
259259
AllocateMemory) given in the argument."
260260
) lldb::SBProcess::DeallocateMemory;
261+
262+
%feature("docstring", "
263+
Get a list of all the memory regions associated with this process.
264+
```
265+
readable_regions = []
266+
for region in process.GetMemoryRegions():
267+
if region.IsReadable():
268+
readable_regions.append(region)
269+
```
270+
"
271+
) lldb::SBProcess::GetMemoryRegions;

0 commit comments

Comments
 (0)