summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/ScriptInterpreter.cpp
diff options
context:
space:
mode:
authorEnrico Granata <granata.enrico@gmail.com>2011-08-16 16:49:25 +0000
committerEnrico Granata <granata.enrico@gmail.com>2011-08-16 16:49:25 +0000
commitbe93a35a8a29376abab778bbe96d3060e79d4f8e (patch)
treea2a1b5ebe5a8a3df82878448441d0a64403e3efb /lldb/source/Interpreter/ScriptInterpreter.cpp
parent5de2044f3d417831d2e64e7df089edce394ed14e (diff)
downloadbcm5719-llvm-be93a35a8a29376abab778bbe96d3060e79d4f8e.tar.gz
bcm5719-llvm-be93a35a8a29376abab778bbe96d3060e79d4f8e.zip
Python commands:
It is now possible to use 'command alias --python' to define a command name that actually triggers execution of a Python function (e.g. command alias --python foo foo_impl makes a command named 'foo' that runs Python function 'foo_impl') The Python function foo_impl should have as signature: def foo_impl(debugger, args, stream, dict): where debugger is an object wrapping an LLDB SBDebugger args is the command line arguments, as an unparsed Python string stream is an SBStream that represents the standard output dict is an internal utility parameter and should be left untouched The function should return None on no error, or an error string to describe any problems llvm-svn: 137722
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/ScriptInterpreter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp
index 94b04e72944..27bbb67605e 100644
--- a/lldb/source/Interpreter/ScriptInterpreter.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreter.cpp
@@ -99,7 +99,8 @@ ScriptInterpreter::InitializeInterpreter (SWIGInitCallback python_swig_init_call
SWIGPythonGetChildAtIndex python_swig_get_child_index,
SWIGPythonGetIndexOfChildWithName python_swig_get_index_child,
SWIGPythonCastPyObjectToSBValue python_swig_cast_to_sbvalue,
- SWIGPythonUpdateSynthProviderInstance python_swig_update_provider)
+ SWIGPythonUpdateSynthProviderInstance python_swig_update_provider,
+ SWIGPythonCallCommand python_swig_call_command)
{
ScriptInterpreterPython::InitializeInterpreter (python_swig_init_callback,
python_swig_breakpoint_callback,
@@ -109,7 +110,8 @@ ScriptInterpreter::InitializeInterpreter (SWIGInitCallback python_swig_init_call
python_swig_get_child_index,
python_swig_get_index_child,
python_swig_cast_to_sbvalue,
- python_swig_update_provider);
+ python_swig_update_provider,
+ python_swig_call_command);
}
void
OpenPOWER on IntegriCloud