Now it's possible to use SBInputReader callbacks in Python. We leak the callback object, unfortunately. A __del__ method can be added to SBInputReader, but we have no way to check the callback function that is on the reader. So we can't call Py_DECREF on it when we have our PythonCallback function. One way to do it is to assume that reified SBInputReaders always have a Python callback (and always call Py_DECREF). Another one is to add methods or properties to SBInputReader (or make the m_callback_function property public). llvm-svn: 162356
17 lines
344 B
Python
17 lines
344 B
Python
"""
|
|
Fuzz tests an object after the default construction to make sure it does not crash lldb.
|
|
"""
|
|
|
|
import sys
|
|
import lldb
|
|
|
|
def fuzz_obj(obj):
|
|
try:
|
|
obj.Initialize(lldb.SBDebugger.Create(), None, 0, "$", "^", True)
|
|
except Exception:
|
|
pass
|
|
obj.IsActive()
|
|
obj.IsDone()
|
|
obj.SetIsDone(True)
|
|
obj.GetGranularity()
|