diff options
Diffstat (limited to 'lldb/scripts/interface/SBSection.i')
-rw-r--r-- | lldb/scripts/interface/SBSection.i | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/scripts/interface/SBSection.i b/lldb/scripts/interface/SBSection.i index 9cf7052063b..8dc3d1564a5 100644 --- a/lldb/scripts/interface/SBSection.i +++ b/lldb/scripts/interface/SBSection.i @@ -118,6 +118,14 @@ public: operator != (const lldb::SBSection &rhs); %pythoncode %{ + def __iter__(self): + '''Iterate over all subsections in a lldb.SBSection object.''' + return lldb_iter(self, 'GetNumSubSections', 'GetSubSectionAtIndex') + + def __len__(self): + '''Return the number of subsections in a lldb.SBSection object.''' + return self.GetNumSubSections() + def get_addr(self): return SBAddress(self, 0) |