aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h3
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp16
2 files changed, 12 insertions, 7 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
index 81e2512..798d947 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
@@ -48,7 +48,8 @@ extern "C" void *LLDBSwigPythonCreateScriptedProcess(
extern "C" void *LLDBSwigPythonCreateScriptedThread(
const char *python_class_name, const char *session_dictionary_name,
- const lldb::TargetSP &target_sp, std::string &error_string);
+ const lldb::ProcessSP &process_sp, StructuredDataImpl *args_impl,
+ std::string &error_string);
extern "C" void *LLDBSWIGPython_CastPyObjectToSBData(void *data);
extern "C" void *LLDBSWIGPython_CastPyObjectToSBError(void *data);
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp
index 4d6903d..d2c28bc 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp
@@ -36,16 +36,20 @@ StructuredData::GenericSP ScriptedThreadPythonInterface::CreatePluginObject(
if (class_name.empty())
return {};
- Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN,
- Locker::FreeLock);
-
+ ProcessSP process_sp = exe_ctx.GetProcessSP();
+ StructuredDataImpl *args_impl = nullptr;
+ if (args_sp) {
+ args_impl = new StructuredDataImpl();
+ args_impl->SetObjectSP(args_sp);
+ }
std::string error_string;
- TargetSP target_sp = exe_ctx.GetTargetSP();
+ Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN,
+ Locker::FreeLock);
void *ret_val = LLDBSwigPythonCreateScriptedThread(
- class_name.str().c_str(), m_interpreter.GetDictionaryName(), target_sp,
- error_string);
+ class_name.str().c_str(), m_interpreter.GetDictionaryName(), process_sp,
+ args_impl, error_string);
if (!ret_val)
return {};