[Lldb-commits] [lldb] a3321ea - [LLDB][Documentation] Add a doc string to sbprocess to show MemoryRegions is iterable (#125557)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 3 11:26:07 PST 2025
Author: Jacob Lalonde
Date: 2025-02-03T11:26:03-08:00
New Revision: a3321ea5d60f10ee1abe03fa95b08095ced61c76
URL: https://github.com/llvm/llvm-project/commit/a3321ea5d60f10ee1abe03fa95b08095ced61c76
DIFF: https://github.com/llvm/llvm-project/commit/a3321ea5d60f10ee1abe03fa95b08095ced61c76.diff
LOG: [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.
Added:
Modified:
lldb/bindings/interface/SBProcessDocstrings.i
Removed:
################################################################################
diff --git a/lldb/bindings/interface/SBProcessDocstrings.i b/lldb/bindings/interface/SBProcessDocstrings.i
index 1b98a79e4f6d36..b5b22052a60944 100644
--- a/lldb/bindings/interface/SBProcessDocstrings.i
+++ b/lldb/bindings/interface/SBProcessDocstrings.i
@@ -258,3 +258,14 @@ SBProcess supports thread iteration. For example (from test/lldbutil.py), ::
Deallocates the block of memory (previously allocated using
AllocateMemory) given in the argument."
) lldb::SBProcess::DeallocateMemory;
+
+%feature("docstring", "
+ Get a list of all the memory regions associated with this process.
+ ```
+ readable_regions = []
+ for region in process.GetMemoryRegions():
+ if region.IsReadable():
+ readable_regions.append(region)
+ ```
+"
+) lldb::SBProcess::GetMemoryRegions;
More information about the lldb-commits
mailing list