From fbf1cfea129dd49f72126e0e7ba9762052e30fb3 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Tue, 19 Apr 2011 19:34:41 +0000 Subject: Converted to use SBProcess.LaunchSimple(). And use self.TraceOn() API. llvm-svn: 129790 --- lldb/test/python_api/frame/TestFrames.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lldb/test/python_api/frame') diff --git a/lldb/test/python_api/frame/TestFrames.py b/lldb/test/python_api/frame/TestFrames.py index ac9cdac63f6..2ce9fd90d1e 100644 --- a/lldb/test/python_api/frame/TestFrames.py +++ b/lldb/test/python_api/frame/TestFrames.py @@ -44,8 +44,7 @@ class FrameAPITestCase(TestBase): # Note that we don't assign the process to self.process as in other test # cases. We want the inferior to run till it exits and there's no need # for the testing framework to kill the inferior upon tearDown(). - error = lldb.SBError() - process = target.Launch (self.dbg.GetListener(), None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) + process = target.LaunchSimple(None, None, os.getcwd()) process = target.GetProcess() self.assertTrue(process.GetState() == lldb.eStateStopped, @@ -63,7 +62,8 @@ class FrameAPITestCase(TestBase): numFrames = min(3, thread.GetNumFrames()) for i in range(numFrames): frame = thread.GetFrameAtIndex(i) - print "frame:", frame + if self.TraceOn(): + print "frame:", frame #print "frame.FindValue('val', lldb.eValueTypeVariableArgument)", frame.FindValue('val', lldb.eValueTypeVariableArgument).GetValue(frame) #print "frame.FindValue('ch', lldb.eValueTypeVariableArgument)", frame.FindValue('ch', lldb.eValueTypeVariableArgument).GetValue(frame) #print "frame.EvaluateExpression('val'):", frame.EvaluateExpression('val').GetValue(frame) @@ -112,8 +112,9 @@ class FrameAPITestCase(TestBase): # By design, the 'a' call frame has the following arg vals: # o a((int)val=1, (char)ch='A') # o a((int)val=3, (char)ch='A') - print "Full stack traces when stopped on the breakpoint 'c':" - print session.getvalue() + if self.TraceOn(): + print "Full stack traces when stopped on the breakpoint 'c':" + print session.getvalue() self.expect(session.getvalue(), "Argugment values displayed correctly", exe=False, substrs = ["a((int)val=1, (char)ch='A')", -- cgit v1.2.3