Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / python_api / default-constructor / sb_module.py
blob175550a5a0fcc606fc35b406082ee3107a25bde6
1 """
2 Fuzz tests an object after the default construction to make sure it does not crash lldb.
3 """
5 import sys
6 import lldb
9 def fuzz_obj(obj):
10 obj.GetFileSpec()
11 obj.GetPlatformFileSpec()
12 obj.SetPlatformFileSpec(lldb.SBFileSpec())
13 obj.GetUUIDString()
14 obj.ResolveFileAddress(sys.maxsize)
15 obj.ResolveSymbolContextForAddress(lldb.SBAddress(), 0)
16 obj.GetDescription(lldb.SBStream())
17 obj.GetNumSymbols()
18 obj.GetSymbolAtIndex(sys.maxsize)
19 sc_list = obj.FindFunctions("my_func")
20 sc_list = obj.FindFunctions("my_func", lldb.eFunctionNameTypeAny)
21 obj.FindGlobalVariables(lldb.SBTarget(), "my_global_var", 1)
22 for section in obj.section_iter():
23 s = str(section)
24 for symbol in obj.symbol_in_section_iter(lldb.SBSection()):
25 s = str(symbol)
26 for symbol in obj:
27 s = str(symbol)
28 obj.GetAddressByteSize()
29 obj.GetByteOrder()
30 obj.GetTriple()