brintos

brintos / llvm-project-archived public Read only

0
0
Text · 949 B · 3bdf587 Raw
38 lines · python
1"""2Fuzz tests an object after the default construction to make sure it does not crash lldb.3"""4 5import sys6import lldb7 8 9def fuzz_obj(obj):10    obj.GetID()11    obj.ClearAllBreakpointSites()12    obj.FindLocationByAddress(sys.maxsize)13    obj.FindLocationIDByAddress(sys.maxsize)14    obj.FindLocationByID(0)15    obj.GetLocationAtIndex(0)16    obj.SetEnabled(True)17    obj.IsEnabled()18    obj.GetHitCount()19    obj.SetIgnoreCount(1)20    obj.GetIgnoreCount()21    obj.SetCondition("i >= 10")22    obj.GetCondition()23    obj.SetThreadID(0)24    obj.GetThreadID()25    obj.SetThreadIndex(0)26    obj.GetThreadIndex()27    obj.SetThreadName("worker thread")28    obj.GetThreadName()29    obj.SetQueueName("my queue")30    obj.GetQueueName()31    obj.SetScriptCallbackFunction(None)32    obj.SetScriptCallbackBody(None)33    obj.GetNumResolvedLocations()34    obj.GetNumLocations()35    obj.GetDescription(lldb.SBStream())36    for bp_loc in obj:37        s = str(bp_loc)38