File tree Expand file tree Collapse file tree 1 file changed +11
-18
lines changed
lldb/test/API/lang/cpp/class_types Expand file tree Collapse file tree 1 file changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -48,24 +48,17 @@ def test_and_python_api(self):
48
48
thread = lldbutil .get_stopped_thread (
49
49
process , lldb .eStopReasonBreakpoint )
50
50
self .assertIsNotNone (thread )
51
- depth = thread .GetNumFrames ()
52
- for i in range (depth - 1 ):
53
- frame = thread .GetFrameAtIndex (i )
54
- function = frame .GetFunction ()
55
- # Print the function header.
56
- if self .TraceOn ():
57
- print ()
58
- print (function )
59
- if function :
60
- # Get all instructions for this function and print them out.
61
- insts = function .GetInstructions (target )
62
- for inst in insts :
63
- # We could simply do 'print inst' to print out the disassembly.
64
- # But we want to print to stdout only if self.TraceOn() is
65
- # True.
66
- disasm = str (inst )
67
- if self .TraceOn ():
68
- print (disasm )
51
+ if self .TraceOn ():
52
+ for frame in thread .frames :
53
+ function = frame .GetFunction ()
54
+ if function :
55
+ # Print the function header.
56
+ print ()
57
+ print (function )
58
+ # Get all instructions for this function and print them out.
59
+ insts = function .GetInstructions (target )
60
+ for inst in insts :
61
+ print (inst )
69
62
70
63
def setUp (self ):
71
64
# Call super's setUp().
You can’t perform that action at this time.
0 commit comments