summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
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/API
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/API')
-rw-r--r--lldb/source/API/SBCommandInterpreter.cpp3
-rw-r--r--lldb/source/API/SBExecutionContext.cpp5
2 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index 397ee61839a..aa1ff55bc73 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -479,7 +479,8 @@ LLDBSwigPythonCallCommand (const char *python_function_name,
const char *session_dictionary_name,
lldb::DebuggerSP& debugger,
const char* args,
- lldb_private::CommandReturnObject &cmd_retobj);
+ lldb_private::CommandReturnObject &cmd_retobj,
+ lldb::ExecutionContextRefSP exe_ctx_ref_sp);
extern "C" bool
LLDBSwigPythonCallModuleInit (const char *python_module_name,
diff --git a/lldb/source/API/SBExecutionContext.cpp b/lldb/source/API/SBExecutionContext.cpp
index 6a8dd2e33f1..d1c21eccb72 100644
--- a/lldb/source/API/SBExecutionContext.cpp
+++ b/lldb/source/API/SBExecutionContext.cpp
@@ -29,6 +29,11 @@ m_exe_ctx_sp(rhs.m_exe_ctx_sp)
{
}
+SBExecutionContext::SBExecutionContext (lldb::ExecutionContextRefSP exe_ctx_ref_sp) :
+m_exe_ctx_sp(exe_ctx_ref_sp)
+{
+}
+
SBExecutionContext::SBExecutionContext (const lldb::SBTarget &target) :
m_exe_ctx_sp(new ExecutionContextRef())
{
OpenPOWER on IntegriCloud