def test_SBBreakpointLocation(self): obj = lldb.SBBreakpointLocation() if self.TraceOn(): print obj self.assertFalse(obj) # Do fuzz testing on the invalid obj, it should not crash lldb. import sb_breakpointlocation sb_breakpointlocation.fuzz_obj(obj)
def auto_continue_location(self): bpno = self.make_target_and_bkpt(pattern="Set a[^ ]* breakpoint here", num_expected_loc=2) bkpt = self.target.FindBreakpointByID(bpno) bkpt.SetAutoContinue(False) loc = lldb.SBBreakpointLocation() for i in range(0,2): func_name = bkpt.location[i].GetAddress().function.name if func_name == "main": loc = bkpt.location[i] self.assertTrue(loc.IsValid(), "Didn't find a location in main") loc.SetAutoContinue(True) process = self.launch_it(lldb.eStateStopped) threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt) self.assertEqual(len(threads), 1, "Didn't get one thread stopped at our breakpoint") func_name = threads[0].frame[0].function.name self.assertEqual(func_name, "call_me")