diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-03-10 19:18:04 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-03-10 19:18:04 +0000 |
commit | d9f2c08a0a4cbf09469e574d68bc4a7c96aee5c3 (patch) | |
tree | 249d03fae191ff46f61039608f33c2e7c6a5392d /lldb/test/python_api/thread/TestThreadAPI.py | |
parent | e1756827814e68199be82406003e17723db33525 (diff) | |
download | bcm5719-llvm-d9f2c08a0a4cbf09469e574d68bc4a7c96aee5c3.tar.gz bcm5719-llvm-d9f2c08a0a4cbf09469e574d68bc4a7c96aee5c3.zip |
Test cleanup. Check for the full caller symbol of malloc -- b(int).
llvm-svn: 127421
Diffstat (limited to 'lldb/test/python_api/thread/TestThreadAPI.py')
-rw-r--r-- | lldb/test/python_api/thread/TestThreadAPI.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lldb/test/python_api/thread/TestThreadAPI.py b/lldb/test/python_api/thread/TestThreadAPI.py index 1a67f571f4c..a9c53983dde 100644 --- a/lldb/test/python_api/thread/TestThreadAPI.py +++ b/lldb/test/python_api/thread/TestThreadAPI.py @@ -95,22 +95,22 @@ class ThreadAPITestCase(TestBase): error = lldb.SBError() self.process = target.Launch (self.dbg.GetListener(), None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error) - thread = get_stopped_thread(self.process, lldb.eStopReasonBreakpoint) - self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint") - self.runCmd("process status") - symbol = get_caller_symbol(thread) - caller = symbol.split('(')[0] - - while caller != "b": + while True: + thread = get_stopped_thread(self.process, lldb.eStopReasonBreakpoint) + self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint") + caller_symbol = get_caller_symbol(thread) + #print "caller symbol of malloc:", caller_symbol + if not caller_symbol: + self.fail("Test failed: could not locate the caller symbol of malloc") + if caller_symbol == "b(int)": + break #self.runCmd("thread backtrace") #self.runCmd("process status") self.process.Continue() - thread = get_stopped_thread(self.process, lldb.eStopReasonBreakpoint) - symbol = get_caller_symbol(thread) - caller = symbol.split('(')[0] - self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint") thread.StepOut() + self.runCmd("thread backtrace") + #self.runCmd("process status") self.assertTrue(thread.GetFrameAtIndex(0).GetLineEntry().GetLine() == self.line2, "step out of malloc into function b is successful") |