summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/thread/TestThreadAPI.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/python_api/thread/TestThreadAPI.py')
-rw-r--r--lldb/test/python_api/thread/TestThreadAPI.py22
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")
OpenPOWER on IntegriCloud