Python synthetic children:
- you can now define a Python class as a synthetic children producer for a type
the class must adhere to this "interface":
def __init__(self, valobj, dict):
def get_child_at_index(self, index):
def get_child_index(self, name):
then using type synth add -l className typeName
(e.g. type synth add -l fooSynthProvider foo)
(This is still WIP with lots to be added)
A small test case is available also as reference
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135865 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/ScriptInterpreter.cpp b/source/Interpreter/ScriptInterpreter.cpp
index 294aeec..27c7bad 100644
--- a/source/Interpreter/ScriptInterpreter.cpp
+++ b/source/Interpreter/ScriptInterpreter.cpp
@@ -93,11 +93,21 @@
void
ScriptInterpreter::InitializeInterpreter (SWIGInitCallback python_swig_init_callback,
SWIGBreakpointCallbackFunction python_swig_breakpoint_callback,
- SWIGPythonTypeScriptCallbackFunction python_swig_typescript_callback)
+ SWIGPythonTypeScriptCallbackFunction python_swig_typescript_callback,
+ SWIGPythonCreateSyntheticProvider python_swig_synthetic_script,
+ SWIGPythonCalculateNumChildren python_swig_calc_children,
+ SWIGPythonGetChildAtIndex python_swig_get_child_index,
+ SWIGPythonGetIndexOfChildWithName python_swig_get_index_child,
+ SWIGPythonCastPyObjectToSBValue python_swig_cast_to_sbvalue)
{
ScriptInterpreterPython::InitializeInterpreter (python_swig_init_callback,
python_swig_breakpoint_callback,
- python_swig_typescript_callback);
+ python_swig_typescript_callback,
+ python_swig_synthetic_script,
+ python_swig_calc_children,
+ python_swig_get_child_index,
+ python_swig_get_index_child,
+ python_swig_cast_to_sbvalue);
}
void