40 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.GetStopReason()10 obj.GetStopReasonDataCount()11 obj.GetStopReasonDataAtIndex(100)12 obj.GetStopDescription(256)13 obj.GetStopDescription(lldb.SBStream())14 obj.GetThreadID()15 obj.GetIndexID()16 obj.GetName()17 obj.GetQueueName()18 obj.StepOver(lldb.eOnlyDuringStepping)19 obj.StepInto(lldb.eOnlyDuringStepping)20 obj.StepOut()21 frame = lldb.SBFrame()22 obj.StepOutOfFrame(frame)23 obj.StepInstruction(True)24 filespec = lldb.SBFileSpec()25 obj.StepOverUntil(frame, filespec, 1234)26 obj.RunToAddress(0xABCD)27 obj.Suspend()28 obj.Resume()29 obj.IsSuspended()30 obj.GetNumFrames()31 obj.GetFrameAtIndex(200)32 obj.GetSelectedFrame()33 obj.SetSelectedFrame(999)34 obj.GetProcess()35 obj.GetDescription(lldb.SBStream())36 obj.Clear()37 for frame in obj:38 s = str(frame)39 len(obj)40