[Lldb-commits] [lldb] r113460 - /lldb/trunk/test/lldbutil.py
Johnny Chen
johnny.chen at apple.com
Wed Sep 8 17:55:07 PDT 2010
Author: johnny
Date: Wed Sep 8 19:55:07 2010
New Revision: 113460
URL: http://llvm.org/viewvc/llvm-project?rev=113460&view=rev
Log:
Added GetStackFrames(thread) utility function.
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=113460&r1=113459&r2=113460&view=diff
==============================================================================
--- lldb/trunk/test/lldbutil.py (original)
+++ lldb/trunk/test/lldbutil.py Wed Sep 8 19:55:07 2010
@@ -44,6 +44,16 @@
return map(GetModuleName, range(thread.GetNumFrames()))
+def GetStackFrames(thread):
+ """
+ Returns a sequence of stack frames for this thread.
+ """
+ def GetStackFrame(i):
+ return thread.GetFrameAtIndex(i)
+
+ return map(GetStackFrame, range(thread.GetNumFrames()))
+
+
def PrintStackTrace(thread):
"""Prints a simple stack trace of this thread."""
depth = thread.GetNumFrames()
More information about the lldb-commits
mailing list