Added GetStackFrames(thread) utility function.
llvm-svn: 113460
This commit is contained in:
parent
24dc27f73a
commit
43a651c609
|
@ -44,6 +44,16 @@ def GetModuleNames(thread):
|
|||
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()
|
||||
|
|
Loading…
Reference in New Issue