[Lldb-commits] [lldb] r127421 - /lldb/trunk/test/python_api/thread/TestThreadAPI.py
Johnny Chen
johnny.chen at apple.com
Thu Mar 10 11:18:04 PST 2011
Author: johnny
Date: Thu Mar 10 13:18:04 2011
New Revision: 127421
URL: http://llvm.org/viewvc/llvm-project?rev=127421&view=rev
Log:
Test cleanup. Check for the full caller symbol of malloc -- b(int).
Modified:
lldb/trunk/test/python_api/thread/TestThreadAPI.py
Modified: lldb/trunk/test/python_api/thread/TestThreadAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/thread/TestThreadAPI.py?rev=127421&r1=127420&r2=127421&view=diff
==============================================================================
--- lldb/trunk/test/python_api/thread/TestThreadAPI.py (original)
+++ lldb/trunk/test/python_api/thread/TestThreadAPI.py Thu Mar 10 13:18:04 2011
@@ -95,22 +95,22 @@
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")
More information about the lldb-commits
mailing list