summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-10-01 21:47:29 +0000
committerEnrico Granata <egranata@apple.com>2014-10-01 21:47:29 +0000
commit06be059ad9950c7f33a63ecabfb3562f34dd3d51 (patch)
tree6c32e91937ab5375eaaa8c3a0503d42d929e5792 /lldb/source/Interpreter/ScriptInterpreterPython.cpp
parentebcf42cdec7a51b8fe6b07cf01ce0f7bd0e8be86 (diff)
downloadbcm5719-llvm-06be059ad9950c7f33a63ecabfb3562f34dd3d51.tar.gz
bcm5719-llvm-06be059ad9950c7f33a63ecabfb3562f34dd3d51.zip
Allow Python commands to optionally take an SBExecutionContext argument in case they need to handle 'where they want to act' separately from the notion of 'currently-selected entity' that is associated to the debugger. Do this in an (hopefully) non-breaking way by running an argcount check before passing in the new argument. Update the test case to also check for this new feature. www update to follow
llvm-svn: 218834
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp')
-rw-r--r--lldb/source/Interpreter/ScriptInterpreterPython.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
index 945e869a794..42a7640f348 100644
--- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
@@ -2510,7 +2510,8 @@ ScriptInterpreterPython::RunScriptBasedCommand(const char* impl_function,
const char* args,
ScriptedCommandSynchronicity synchronicity,
lldb_private::CommandReturnObject& cmd_retobj,
- Error& error)
+ Error& error,
+ const lldb_private::ExecutionContext& exe_ctx)
{
if (!impl_function)
{
@@ -2525,6 +2526,7 @@ ScriptInterpreterPython::RunScriptBasedCommand(const char* impl_function,
}
lldb::DebuggerSP debugger_sp = m_interpreter.GetDebugger().shared_from_this();
+ lldb::ExecutionContextRefSP exe_ctx_ref_sp(new ExecutionContextRef(exe_ctx));
if (!debugger_sp.get())
{
@@ -2548,7 +2550,8 @@ ScriptInterpreterPython::RunScriptBasedCommand(const char* impl_function,
m_dictionary_name.c_str(),
debugger_sp,
args,
- cmd_retobj);
+ cmd_retobj,
+ exe_ctx_ref_sp);
}
if (!ret_val)
OpenPOWER on IntegriCloud