sb_module.py revision 3e8c25f62f92145b6fb699b379cbfe72b1245d4a
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.GetFileSpec() 10 obj.GetPlatformFileSpec() 11 obj.SetPlatformFileSpec(lldb.SBFileSpec()) 12 obj.GetUUIDString() 13 obj.ResolveFileAddress(sys.maxint) 14 obj.ResolveSymbolContextForAddress(lldb.SBAddress(), 0) 15 obj.GetDescription(lldb.SBStream()) 16 obj.GetNumSymbols() 17 obj.GetSymbolAtIndex(sys.maxint) 18 obj.FindFunctions("my_func", 0xffffffff, True, lldb.SBSymbolContextList()) 19 obj.FindGlobalVariables(lldb.SBTarget(), "my_global_var", 1) 20