xref: /llvm-project/lldb/test/API/python_api/default-constructor/sb_function.py (revision 99451b4453688a94c6014cac233d371ab4cc342d)
1"""
2Fuzz tests an object after the default construction to make sure it does not crash lldb.
3"""
4
5import lldb
6
7
8def fuzz_obj(obj):
9    obj.GetName()
10    obj.GetMangledName()
11    obj.GetInstructions(lldb.SBTarget())
12    sa = obj.GetStartAddress()
13    ea = obj.GetEndAddress()
14    # Do fuzz testing on the address obj, it should not crash lldb.
15    import sb_address
16    sb_address.fuzz_obj(sa)
17    sb_address.fuzz_obj(ea)
18    obj.GetPrologueByteSize
19    obj.GetDescription(lldb.SBStream())
20