diff options
author | Jim Ingham <jingham@apple.com> | 2019-10-03 22:50:18 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2019-10-03 22:50:18 +0000 |
commit | 27a14f19c810f494adddb8aaff960336ab4492e7 (patch) | |
tree | a7eae222175b77917ee9ccfd1b0f21555d7118f4 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
parent | 145cdad11925194ec41949b5c8f0cb037f9e7941 (diff) | |
download | bcm5719-llvm-27a14f19c810f494adddb8aaff960336ab4492e7.tar.gz bcm5719-llvm-27a14f19c810f494adddb8aaff960336ab4492e7.zip |
Pass an SBStructuredData to scripted ThreadPlans on use.
This will allow us to write reusable scripted ThreadPlans, since
you can use key/value pairs with known keys in the plan to parametrize
its behavior.
Differential Revision: https://reviews.llvm.org/D68366
llvm-svn: 373675
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index dc13ed71c42..e5000bfd4ae 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -97,6 +97,7 @@ LLDBSwigPythonCreateCommandObject(const char *python_class_name, extern "C" void *LLDBSwigPythonCreateScriptedThreadPlan( const char *python_class_name, const char *session_dictionary_name, + StructuredDataImpl *args_data, std::string &error_string, const lldb::ThreadPlanSP &thread_plan_sp); @@ -1845,7 +1846,8 @@ StructuredData::DictionarySP ScriptInterpreterPythonImpl::OSPlugin_CreateThread( } StructuredData::ObjectSP ScriptInterpreterPythonImpl::CreateScriptedThreadPlan( - const char *class_name, std::string &error_str, + const char *class_name, StructuredDataImpl *args_data, + std::string &error_str, lldb::ThreadPlanSP thread_plan_sp) { if (class_name == nullptr || class_name[0] == '\0') return StructuredData::ObjectSP(); @@ -1868,7 +1870,7 @@ StructuredData::ObjectSP ScriptInterpreterPythonImpl::CreateScriptedThreadPlan( Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN); ret_val = LLDBSwigPythonCreateScriptedThreadPlan( class_name, python_interpreter->m_dictionary_name.c_str(), - error_str, thread_plan_sp); + args_data, error_str, thread_plan_sp); if (!ret_val) return {}; } |