Skip to content

Commit a3321ea

Browse files
authored
[LLDB][Documentation] Add a doc string to sbprocess to show MemoryRegions is iterable (#125557)
My colleague, @lukejriddle made the SBMemoryRegionList object iterable in #117358. This isn't documented anywhere and so I added a blurb about it to SBProcess.
1 parent a9e249f commit a3321ea

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)