5ac1c065efedfae637dac2e901eeed8acb43349d
[openbsd] /
1 """
2 Fuzz tests an object after the default construction to make sure it does not crash lldb.
3 """
4
5 import lldb
6
7
8 def fuzz_obj(obj):
9     obj.GetAddress()
10     obj.GetLoadAddress()
11     obj.SetEnabled(True)
12     obj.IsEnabled()
13     obj.SetCondition("i >= 10")
14     obj.GetCondition()
15     obj.SetThreadID(0)
16     obj.GetThreadID()
17     obj.SetThreadIndex(0)
18     obj.GetThreadIndex()
19     obj.SetThreadName("worker thread")
20     obj.GetThreadName()
21     obj.SetQueueName("my queue")
22     obj.GetQueueName()
23     obj.IsResolved()
24     obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelVerbose)
25     breakpoint = obj.GetBreakpoint()
26     # Do fuzz testing on the breakpoint obj, it should not crash lldb.
27     import sb_breakpoint
28     sb_breakpoint.fuzz_obj(breakpoint)