1 """ 2 Fuzz tests an object after the default construction to make sure it does not crash lldb. 3 """ 4 5 import sys 6 import lldb 7 8 def fuzz_obj(obj): 9 obj.GetStopReason() 10 obj.GetStopReasonDataCount() 11 obj.GetStopReasonDataAtIndex(100) 12 obj.GetStopDescription(256) 13 obj.GetThreadID() 14 obj.GetIndexID() 15 obj.GetName() 16 obj.GetQueueName() 17 obj.StepOver(lldb.eOnlyDuringStepping) 18 obj.StepInto(lldb.eOnlyDuringStepping) 19 obj.StepOut() 20 frame = lldb.SBFrame() 21 obj.StepOutOfFrame(frame) 22 obj.StepInstruction(True) 23 filespec = lldb.SBFileSpec() 24 obj.StepOverUntil(frame, filespec, 1234) 25 obj.RunToAddress(0xabcd) 26 obj.Suspend() 27 obj.Resume() 28 obj.IsSuspended() 29 obj.GetNumFrames() 30 obj.GetFrameAtIndex(200) 31 obj.GetSelectedFrame() 32 obj.SetSelectedFrame(999) 33 obj.GetProcess() 34 obj.GetDescription(lldb.SBStream()) 35 obj.Clear() 36 for frame in obj: 37 print frame 38