Test cleanup. Check for the full caller symbol of malloc -- b(int).
llvm-svn: 127421
This commit is contained in:
parent
e175682781
commit
d9f2c08a0a
|
@ -95,22 +95,22 @@ class ThreadAPITestCase(TestBase):
|
||||||
error = lldb.SBError()
|
error = lldb.SBError()
|
||||||
self.process = target.Launch (self.dbg.GetListener(), None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
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)
|
while True:
|
||||||
self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint")
|
thread = get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
|
||||||
self.runCmd("process status")
|
self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint")
|
||||||
symbol = get_caller_symbol(thread)
|
caller_symbol = get_caller_symbol(thread)
|
||||||
caller = symbol.split('(')[0]
|
#print "caller symbol of malloc:", caller_symbol
|
||||||
|
if not caller_symbol:
|
||||||
while caller != "b":
|
self.fail("Test failed: could not locate the caller symbol of malloc")
|
||||||
|
if caller_symbol == "b(int)":
|
||||||
|
break
|
||||||
#self.runCmd("thread backtrace")
|
#self.runCmd("thread backtrace")
|
||||||
#self.runCmd("process status")
|
#self.runCmd("process status")
|
||||||
self.process.Continue()
|
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()
|
thread.StepOut()
|
||||||
|
self.runCmd("thread backtrace")
|
||||||
|
#self.runCmd("process status")
|
||||||
self.assertTrue(thread.GetFrameAtIndex(0).GetLineEntry().GetLine() == self.line2,
|
self.assertTrue(thread.GetFrameAtIndex(0).GetLineEntry().GetLine() == self.line2,
|
||||||
"step out of malloc into function b is successful")
|
"step out of malloc into function b is successful")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue