30 lines · python
1"""2Fuzz tests an object after the default construction to make sure it does not crash lldb.3"""4 5import lldb6 7 8def fuzz_obj(obj):9 obj.GetAddress()10 obj.GetLoadAddress()11 obj.SetEnabled(True)12 obj.IsEnabled()13 obj.SetCondition("i >= 10")14 obj.GetCondition()15 obj.SetThreadID(0)16 obj.GetThreadID()17 obj.SetThreadIndex(0)18 obj.GetThreadIndex()19 obj.SetThreadName("worker thread")20 obj.GetThreadName()21 obj.SetQueueName("my queue")22 obj.GetQueueName()23 obj.IsResolved()24 obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelVerbose)25 breakpoint = obj.GetBreakpoint()26 # Do fuzz testing on the breakpoint obj, it should not crash lldb.27 import sb_breakpoint28 29 sb_breakpoint.fuzz_obj(breakpoint)30