diff options
author | Med Ismail Bennani <medismail.bennani@gmail.com> | 2022-01-18 12:45:27 +0100 |
---|---|---|
committer | Med Ismail Bennani <medismail.bennani@gmail.com> | 2022-01-24 20:25:53 +0100 |
commit | 1b86344fa80bd11853e0347ea33dc6cb5a460c4f (patch) | |
tree | 8019bb265ddb0dd2ff95eed05b1bd66e249b7714 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp | |
parent | 4858fe04a1571e78ff97b778c0fb6a46855c3d6a (diff) | |
download | llvm-1b86344fa80bd11853e0347ea33dc6cb5a460c4f.zip llvm-1b86344fa80bd11853e0347ea33dc6cb5a460c4f.tar.gz llvm-1b86344fa80bd11853e0347ea33dc6cb5a460c4f.tar.bz2 |
[lldb/Plugins] Move ScriptedThreadInterface to ScriptedThread
Since we can have multiple Scripted Threads per Scripted Process, having
only a single ScriptedThreadInterface (with a single object instance)
will cause the method calls to be done on the wrong object.
Instead, this patch creates a separate ScriptedThreadInterface for each
new lldb_private::ScriptedThread to make sure we interact with the right
instance.
rdar://87427911
Differential Revision: https://reviews.llvm.org/D117070
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp index 447bcee..29516c4 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp @@ -165,12 +165,8 @@ ScriptedProcessPythonInterface::GetScriptedThreadPluginName() { } lldb::ScriptedThreadInterfaceSP -ScriptedProcessPythonInterface::GetScriptedThreadInterface() { - if (!m_scripted_thread_interface_sp) - m_scripted_thread_interface_sp = - std::make_shared<ScriptedThreadPythonInterface>(m_interpreter); - - return m_scripted_thread_interface_sp; +ScriptedProcessPythonInterface::CreateScriptedThreadInterface() { + return std::make_shared<ScriptedThreadPythonInterface>(m_interpreter); } #endif |