1 %extend lldb::SBThreadCollection { 2 #ifdef SWIGPYTHON 3 %pythoncode%{ 4 5 def __iter__(self): 6 '''Iterate over all threads in a lldb.SBThreadCollection object.''' 7 return lldb_iter(self, 'GetSize', 'GetThreadAtIndex') 8 9 def __len__(self): 10 '''Return the number of threads in a lldb.SBThreadCollection object.''' 11 return self.GetSize() 12 %} 13 #endif 14 } 15