summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/interface/SBValueList.i
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/interface/SBValueList.i')
-rw-r--r--lldb/scripts/interface/SBValueList.i4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/scripts/interface/SBValueList.i b/lldb/scripts/interface/SBValueList.i
index c2cdda23700..7960e09c268 100644
--- a/lldb/scripts/interface/SBValueList.i
+++ b/lldb/scripts/interface/SBValueList.i
@@ -102,6 +102,10 @@ public:
GetFirstValueByName (const char* name) const;
%pythoncode %{
+ def __iter__(self):
+ '''Iterate over all values in a lldb.SBValueList object.'''
+ return lldb_iter(self, 'GetSize', 'GetValueAtIndex')
+
def __len__(self):
return int(self.GetSize())
OpenPOWER on IntegriCloud