[Lldb-commits] [lldb] r130940 - /lldb/trunk/test/lldbutil.py

Johnny Chen johnny.chen at apple.com
Thu May 5 11:50:56 PDT 2011


Author: johnny
Date: Thu May  5 13:50:56 2011
New Revision: 130940

URL: http://llvm.org/viewvc/llvm-project?rev=130940&view=rev
Log:
Change the process iteration pattern to a more concise:

    for thread in process:
        print >> output, print_stacktrace(thread, string_buffer=True)

Modified:
    lldb/trunk/test/lldbutil.py

Modified: lldb/trunk/test/lldbutil.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbutil.py?rev=130940&r1=130939&r2=130940&view=diff
==============================================================================
--- lldb/trunk/test/lldbutil.py (original)
+++ lldb/trunk/test/lldbutil.py Thu May  5 13:50:56 2011
@@ -399,8 +399,8 @@
 
     print >> output, "Stack traces for " + repr(process)
 
-    for i in range(process.GetNumThreads()):
-        print >> output, print_stacktrace(process.GetThreadAtIndex(i), string_buffer=True)
+    for thread in process:
+        print >> output, print_stacktrace(thread, string_buffer=True)
 
     if string_buffer:
         return output.getvalue()





More information about the lldb-commits mailing list