From a9dbf4325e9b97ca4c68baf4d05fad55bd194332 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Mon, 17 Oct 2011 21:45:27 +0000 Subject: this patch introduces a new command script import command which takes as input a filename for a Python script and imports the module contained in that file. the containing directory is added to the Python path such that dependencies are honored. also, the module may contain an __lldb_init_module(debugger,dict) function, which gets called after importing, and which can somehow initialize the module's interaction with lldb llvm-svn: 142283 --- lldb/source/Interpreter/ScriptInterpreter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lldb/source/Interpreter/ScriptInterpreter.cpp') diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp index 27bbb67605e..e125d657c33 100644 --- a/lldb/source/Interpreter/ScriptInterpreter.cpp +++ b/lldb/source/Interpreter/ScriptInterpreter.cpp @@ -100,7 +100,8 @@ ScriptInterpreter::InitializeInterpreter (SWIGInitCallback python_swig_init_call SWIGPythonGetIndexOfChildWithName python_swig_get_index_child, SWIGPythonCastPyObjectToSBValue python_swig_cast_to_sbvalue, SWIGPythonUpdateSynthProviderInstance python_swig_update_provider, - SWIGPythonCallCommand python_swig_call_command) + SWIGPythonCallCommand python_swig_call_command, + SWIGPythonCallModuleInit python_swig_call_mod_init) { ScriptInterpreterPython::InitializeInterpreter (python_swig_init_callback, python_swig_breakpoint_callback, @@ -111,7 +112,8 @@ ScriptInterpreter::InitializeInterpreter (SWIGInitCallback python_swig_init_call python_swig_get_index_child, python_swig_cast_to_sbvalue, python_swig_update_provider, - python_swig_call_command); + python_swig_call_command, + python_swig_call_mod_init); } void -- cgit v1.2.3