xref: /llvm-project-15.0.7/lldb/test/API/python_api/default-constructor/sb_breakpointname.py (revision 99451b44)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.IsValid()
10    obj.GetName()
11    obj.SetEnabled(True)
12    obj.IsEnabled()
13    obj.SetOneShot(True)
14    obj.IsOneShot()
15    obj.SetIgnoreCount(1)
16    obj.GetIgnoreCount()
17    obj.SetCondition("1 == 2")
18    obj.GetCondition()
19    obj.SetAutoContinue(False)
20    obj.GetAutoContinue()
21    obj.SetThreadID(0x1234)
22    obj.GetThreadID()
23    obj.SetThreadIndex(10)
24    obj.GetThreadIndex()
25    obj.SetThreadName("AThread")
26    obj.GetThreadName()
27    obj.SetQueueName("AQueue")
28    obj.GetQueueName()
29    obj.SetScriptCallbackFunction("AFunction")
30    commands = lldb.SBStringList()
31    obj.SetCommandLineCommands(commands)
32    obj.GetCommandLineCommands(commands)
33    obj.SetScriptCallbackBody("Insert Python Code here")
34    obj.GetAllowList()
35    obj.SetAllowList(False)
36    obj.GetAllowDelete()
37    obj.SetAllowDelete(False)
38    obj.GetAllowDisable()
39    obj.SetAllowDisable(False)
40    stream = lldb.SBStream()
41    obj.GetDescription(stream)
42

served by {OpenGrok

Last Index Update: Tue Oct 21 18:42:31 GMT 2025