<rdar://problem/12200505> Fixing a logical error in SBProcess, where the get_process_thread_list function was creating invalid threads_access instances, and hence failing to correctly fill in the list
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165421 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/interface/SBProcess.i b/scripts/Python/interface/SBProcess.i
index 1adc238..2a7bb77 100644
--- a/scripts/Python/interface/SBProcess.i
+++ b/scripts/Python/interface/SBProcess.i
@@ -364,8 +364,9 @@
def get_process_thread_list(self):
'''An accessor function that returns a list() that contains all threads in a lldb.SBProcess object.'''
threads = []
- for idx in range(self.GetNumThreads()):
- threads.append(self.threads_access(idx))
+ accessor = self.get_threads_access_object()
+ for idx in range(len(accessor)):
+ threads.append(accessor[idx])
return threads
__swig_getmethods__["threads"] = get_process_thread_list