sb_breakpoint.py revision a70c157b98bc6e9c8d1853e54473c3bd5a349a77
1"""
2Fuzz tests an object after the default construction to make sure it does not crash lldb.
3"""
4
5import sys
6import lldb
7
8def fuzz_obj(obj):
9    obj.GetID()
10    obj.ClearAllBreakpointSites()
11    obj.FindLocationByAddress(sys.maxint)
12    obj.FindLocationIDByAddress(sys.maxint)
13    obj.FindLocationByID(0)
14    obj.GetLocationAtIndex(0)
15    obj.SetEnabled(True)
16    obj.IsEnabled()
17    obj.GetHitCount()
18    obj.SetIgnoreCount(1)
19    obj.GetIgnoreCount()
20    obj.SetCondition("i >= 10")
21    obj.GetCondition()
22    obj.SetThreadID(0)
23    obj.GetThreadID()
24    obj.SetThreadIndex(0)
25    obj.GetThreadIndex()
26    obj.SetThreadName("worker thread")
27    obj.GetThreadName()
28    obj.SetQueueName("my queue")
29    obj.GetQueueName()
30    obj.SetCallback(None, None)
31    obj.GetNumResolvedLocations()
32    obj.GetNumLocations()
33    obj.GetDescription(lldb.SBStream())
34    for bp_loc in obj:
35        print bp_loc
36