38 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.GetFrameID()10 obj.GetPC()11 obj.SetPC(0xFFFFFFFF)12 obj.GetSP()13 obj.GetFP()14 obj.GetPCAddress()15 obj.GetSymbolContext(0)16 obj.GetModule()17 obj.GetCompileUnit()18 obj.GetFunction()19 obj.GetSymbol()20 obj.GetBlock()21 obj.GetFunctionName()22 obj.IsInlined()23 obj.EvaluateExpression("x + y")24 obj.EvaluateExpression("x + y", lldb.eDynamicCanRunTarget)25 obj.GetFrameBlock()26 obj.GetLineEntry()27 obj.GetThread()28 obj.Disassemble()29 obj.GetVariables(True, True, True, True)30 obj.GetVariables(True, True, True, False, lldb.eDynamicCanRunTarget)31 obj.GetRegisters()32 obj.FindVariable("my_var")33 obj.FindVariable("my_var", lldb.eDynamicCanRunTarget)34 obj.FindValue("your_var", lldb.eValueTypeVariableGlobal)35 obj.FindValue("your_var", lldb.eValueTypeVariableStatic, lldb.eDynamicCanRunTarget)36 obj.GetDescription(lldb.SBStream())37 obj.Clear()38