diff --git a/lldb/include/lldb/Interpreter/ScriptedInterface.h b/lldb/include/lldb/Interpreter/Interfaces/ScriptedInterface.h rename from lldb/include/lldb/Interpreter/ScriptedInterface.h rename to lldb/include/lldb/Interpreter/Interfaces/ScriptedInterface.h --- a/lldb/include/lldb/Interpreter/ScriptedInterface.h +++ b/lldb/include/lldb/Interpreter/Interfaces/ScriptedInterface.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLDB_INTERPRETER_SCRIPTEDINTERFACE_H -#define LLDB_INTERPRETER_SCRIPTEDINTERFACE_H +#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDINTERFACE_H +#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDINTERFACE_H #include "lldb/Core/StructuredDataImpl.h" #include "lldb/Target/ExecutionContext.h" @@ -74,4 +74,4 @@ StructuredData::GenericSP m_object_instance_sp; }; } // namespace lldb_private -#endif // LLDB_INTERPRETER_SCRIPTEDINTERFACE_H +#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDINTERFACE_H diff --git a/lldb/include/lldb/Interpreter/ScriptedPlatformInterface.h b/lldb/include/lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h rename from lldb/include/lldb/Interpreter/ScriptedPlatformInterface.h rename to lldb/include/lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h --- a/lldb/include/lldb/Interpreter/ScriptedPlatformInterface.h +++ b/lldb/include/lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h @@ -6,11 +6,11 @@ // //===----------------------------------------------------------------------===// -#ifndef LLDB_INTERPRETER_SCRIPTEDPLATFORMINTERFACE_H -#define LLDB_INTERPRETER_SCRIPTEDPLATFORMINTERFACE_H +#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H +#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H #include "lldb/Core/StructuredDataImpl.h" -#include "lldb/Interpreter/ScriptedInterface.h" +#include "lldb/Interpreter/Interfaces/ScriptedInterface.h" #include "lldb/lldb-private.h" @@ -46,4 +46,4 @@ }; } // namespace lldb_private -#endif // LLDB_INTERPRETER_SCRIPTEDPLATFORMINTERFACE_H +#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H diff --git a/lldb/include/lldb/Interpreter/ScriptedProcessInterface.h b/lldb/include/lldb/Interpreter/Interfaces/ScriptedProcessInterface.h rename from lldb/include/lldb/Interpreter/ScriptedProcessInterface.h rename to lldb/include/lldb/Interpreter/Interfaces/ScriptedProcessInterface.h --- a/lldb/include/lldb/Interpreter/ScriptedProcessInterface.h +++ b/lldb/include/lldb/Interpreter/Interfaces/ScriptedProcessInterface.h @@ -6,11 +6,11 @@ // //===----------------------------------------------------------------------===// -#ifndef LLDB_INTERPRETER_SCRIPTEDPROCESSINTERFACE_H -#define LLDB_INTERPRETER_SCRIPTEDPROCESSINTERFACE_H +#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDPROCESSINTERFACE_H +#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDPROCESSINTERFACE_H +#include "ScriptedInterface.h" #include "lldb/Core/StructuredDataImpl.h" -#include "lldb/Interpreter/ScriptedInterface.h" #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/lldb-private.h" @@ -80,36 +80,6 @@ return {}; } }; - -class ScriptedThreadInterface : virtual public ScriptedInterface { -public: - StructuredData::GenericSP - CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, - StructuredData::DictionarySP args_sp, - StructuredData::Generic *script_obj = nullptr) override { - return {}; - } - - virtual lldb::tid_t GetThreadID() { return LLDB_INVALID_THREAD_ID; } - - virtual std::optional GetName() { return std::nullopt; } - - virtual lldb::StateType GetState() { return lldb::eStateInvalid; } - - virtual std::optional GetQueue() { return std::nullopt; } - - virtual StructuredData::DictionarySP GetStopReason() { return {}; } - - virtual StructuredData::ArraySP GetStackFrames() { return {}; } - - virtual StructuredData::DictionarySP GetRegisterInfo() { return {}; } - - virtual std::optional GetRegisterContext() { - return std::nullopt; - } - - virtual StructuredData::ArraySP GetExtendedInfo() { return {}; } -}; } // namespace lldb_private -#endif // LLDB_INTERPRETER_SCRIPTEDPROCESSINTERFACE_H +#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDPROCESSINTERFACE_H diff --git a/lldb/include/lldb/Interpreter/Interfaces/ScriptedThreadInterface.h b/lldb/include/lldb/Interpreter/Interfaces/ScriptedThreadInterface.h new file mode 100644 --- /dev/null +++ b/lldb/include/lldb/Interpreter/Interfaces/ScriptedThreadInterface.h @@ -0,0 +1,52 @@ +//===-- ScriptedThreadInterface.h -------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDTHREADINTERFACE_H +#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDTHREADINTERFACE_H + +#include "ScriptedInterface.h" +#include "lldb/Core/StructuredDataImpl.h" + +#include "lldb/lldb-private.h" + +#include +#include + +namespace lldb_private { +class ScriptedThreadInterface : virtual public ScriptedInterface { +public: + StructuredData::GenericSP + CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, + StructuredData::DictionarySP args_sp, + StructuredData::Generic *script_obj = nullptr) override { + return {}; + } + + virtual lldb::tid_t GetThreadID() { return LLDB_INVALID_THREAD_ID; } + + virtual std::optional GetName() { return std::nullopt; } + + virtual lldb::StateType GetState() { return lldb::eStateInvalid; } + + virtual std::optional GetQueue() { return std::nullopt; } + + virtual StructuredData::DictionarySP GetStopReason() { return {}; } + + virtual StructuredData::ArraySP GetStackFrames() { return {}; } + + virtual StructuredData::DictionarySP GetRegisterInfo() { return {}; } + + virtual std::optional GetRegisterContext() { + return std::nullopt; + } + + virtual StructuredData::ArraySP GetExtendedInfo() { return {}; } +}; +} // namespace lldb_private + +#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDTHREADINTERFACE_H diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h b/lldb/include/lldb/Interpreter/ScriptInterpreter.h --- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h +++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h @@ -21,9 +21,10 @@ #include "lldb/Core/ThreadedCommunication.h" #include "lldb/Host/PseudoTerminal.h" #include "lldb/Host/StreamFile.h" +#include "lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h" +#include "lldb/Interpreter/Interfaces/ScriptedProcessInterface.h" +#include "lldb/Interpreter/Interfaces/ScriptedThreadInterface.h" #include "lldb/Interpreter/ScriptObject.h" -#include "lldb/Interpreter/ScriptedPlatformInterface.h" -#include "lldb/Interpreter/ScriptedProcessInterface.h" #include "lldb/Utility/Broadcaster.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/StructuredData.h" @@ -588,6 +589,10 @@ return std::make_unique(); } + virtual lldb::ScriptedThreadInterfaceSP CreateScriptedThreadInterface() { + return std::make_shared(); + } + ScriptedPlatformInterface &GetScriptedPlatformInterface() { return *m_scripted_platform_interface_up; } diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt --- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt +++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt @@ -19,14 +19,12 @@ list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit) endif() +add_subdirectory(Interfaces) + add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN PythonDataObjects.cpp PythonReadline.cpp ScriptInterpreterPython.cpp - ScriptedPythonInterface.cpp - ScriptedProcessPythonInterface.cpp - ScriptedThreadPythonInterface.cpp - ScriptedPlatformPythonInterface.cpp LINK_LIBS lldbBreakpoint @@ -35,6 +33,7 @@ lldbHost lldbInterpreter lldbTarget + lldbPluginScriptInterpreterPythonInterfaces ${Python3_LIBRARIES} ${LLDB_LIBEDIT_LIBS} diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt copy from lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt copy to lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt --- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt @@ -19,19 +19,14 @@ list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit) endif() -add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN - PythonDataObjects.cpp - PythonReadline.cpp - ScriptInterpreterPython.cpp +add_lldb_library(lldbPluginScriptInterpreterPythonInterfaces ScriptedPythonInterface.cpp ScriptedProcessPythonInterface.cpp ScriptedThreadPythonInterface.cpp ScriptedPlatformPythonInterface.cpp LINK_LIBS - lldbBreakpoint lldbCore - lldbDataFormatters lldbHost lldbInterpreter lldbTarget diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h rename from lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h rename to lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h @@ -6,15 +6,15 @@ // //===----------------------------------------------------------------------===// -#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPLATFORMPYTHONINTERFACE_H -#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPLATFORMPYTHONINTERFACE_H +#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H +#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H #include "lldb/Host/Config.h" #if LLDB_ENABLE_PYTHON #include "ScriptedPythonInterface.h" -#include "lldb/Interpreter/ScriptedPlatformInterface.h" +#include "lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h" namespace lldb_private { class ScriptedPlatformPythonInterface : public ScriptedPlatformInterface, @@ -41,4 +41,4 @@ } // namespace lldb_private #endif // LLDB_ENABLE_PYTHON -#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPLATFORMPYTHONINTERFACE_H +#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.cpp rename from lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.cpp rename to lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.cpp --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.cpp @@ -14,10 +14,10 @@ #if LLDB_ENABLE_PYTHON // LLDB Python header must be included first -#include "lldb-python.h" +#include "../lldb-python.h" -#include "SWIGPythonBridge.h" -#include "ScriptInterpreterPythonImpl.h" +#include "../SWIGPythonBridge.h" +#include "../ScriptInterpreterPythonImpl.h" #include "ScriptedPlatformPythonInterface.h" using namespace lldb; diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h rename from lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h rename to lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h @@ -6,15 +6,15 @@ // //===----------------------------------------------------------------------===// -#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPROCESSPYTHONINTERFACE_H -#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPROCESSPYTHONINTERFACE_H +#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H +#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H #include "lldb/Host/Config.h" #if LLDB_ENABLE_PYTHON #include "ScriptedPythonInterface.h" -#include "lldb/Interpreter/ScriptedProcessInterface.h" +#include "lldb/Interpreter/Interfaces/ScriptedProcessInterface.h" #include namespace lldb_private { @@ -68,4 +68,4 @@ } // namespace lldb_private #endif // LLDB_ENABLE_PYTHON -#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPROCESSPYTHONINTERFACE_H +#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.cpp rename from lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp rename to lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.cpp --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.cpp @@ -9,7 +9,7 @@ #include "lldb/Host/Config.h" #if LLDB_ENABLE_PYTHON // LLDB Python header must be included first -#include "lldb-python.h" +#include "../lldb-python.h" #endif #include "lldb/Target/Process.h" #include "lldb/Utility/Log.h" @@ -18,8 +18,8 @@ #if LLDB_ENABLE_PYTHON -#include "SWIGPythonBridge.h" -#include "ScriptInterpreterPythonImpl.h" +#include "../SWIGPythonBridge.h" +#include "../ScriptInterpreterPythonImpl.h" #include "ScriptedProcessPythonInterface.h" #include "ScriptedThreadPythonInterface.h" #include @@ -199,7 +199,7 @@ lldb::ScriptedThreadInterfaceSP ScriptedProcessPythonInterface::CreateScriptedThreadInterface() { - return std::make_shared(m_interpreter); + return m_interpreter.CreateScriptedThreadInterface(); } StructuredData::DictionarySP ScriptedProcessPythonInterface::GetMetadata() { diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h rename from lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h rename to lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPYTHONINTERFACE_H -#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPYTHONINTERFACE_H +#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPYTHONINTERFACE_H +#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPYTHONINTERFACE_H #if LLDB_ENABLE_PYTHON @@ -18,12 +18,12 @@ #include #include "lldb/Host/Config.h" -#include "lldb/Interpreter/ScriptedInterface.h" +#include "lldb/Interpreter/Interfaces/ScriptedInterface.h" #include "lldb/Utility/DataBufferHeap.h" -#include "PythonDataObjects.h" -#include "SWIGPythonBridge.h" -#include "ScriptInterpreterPythonImpl.h" +#include "../PythonDataObjects.h" +#include "../SWIGPythonBridge.h" +#include "../ScriptInterpreterPythonImpl.h" namespace lldb_private { class ScriptInterpreterPythonImpl; @@ -146,7 +146,6 @@ original_arg = ExtractValueFromPythonObject(transformed_arg, error); } - void ReverseTransform(bool &original_arg, python::PythonObject transformed_arg, Status &error) { python::PythonBoolean boolean_arg = python::PythonBoolean( @@ -254,4 +253,4 @@ } // namespace lldb_private #endif // LLDB_ENABLE_PYTHON -#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPYTHONINTERFACE_H +#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPYTHONINTERFACE_H diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp rename from lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp rename to lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp @@ -13,9 +13,9 @@ #if LLDB_ENABLE_PYTHON // LLDB Python header must be included first -#include "lldb-python.h" +#include "../lldb-python.h" -#include "ScriptInterpreterPythonImpl.h" +#include "../ScriptInterpreterPythonImpl.h" #include "ScriptedPythonInterface.h" #include diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.h rename from lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.h rename to lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.h --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.h @@ -6,15 +6,15 @@ // //===----------------------------------------------------------------------===// -#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDTHREADPYTHONINTERFACE_H -#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDTHREADPYTHONINTERFACE_H +#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H +#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H #include "lldb/Host/Config.h" #if LLDB_ENABLE_PYTHON #include "ScriptedPythonInterface.h" -#include "lldb/Interpreter/ScriptedProcessInterface.h" +#include "lldb/Interpreter/Interfaces/ScriptedThreadInterface.h" #include namespace lldb_private { @@ -49,4 +49,4 @@ } // namespace lldb_private #endif // LLDB_ENABLE_PYTHON -#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDTHREADPYTHONINTERFACE_H +#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.cpp rename from lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp rename to lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.cpp --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.cpp @@ -13,10 +13,10 @@ #if LLDB_ENABLE_PYTHON // LLDB Python header must be included first -#include "lldb-python.h" +#include "../lldb-python.h" -#include "SWIGPythonBridge.h" -#include "ScriptInterpreterPythonImpl.h" +#include "../SWIGPythonBridge.h" +#include "../ScriptInterpreterPythonImpl.h" #include "ScriptedThreadPythonInterface.h" #include diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -14,12 +14,13 @@ // LLDB Python header must be included first #include "lldb-python.h" +#include "Interfaces/ScriptedPlatformPythonInterface.h" +#include "Interfaces/ScriptedProcessPythonInterface.h" +#include "Interfaces/ScriptedThreadPythonInterface.h" #include "PythonDataObjects.h" #include "PythonReadline.h" #include "SWIGPythonBridge.h" #include "ScriptInterpreterPythonImpl.h" -#include "ScriptedPlatformPythonInterface.h" -#include "ScriptedProcessPythonInterface.h" #include "lldb/API/SBError.h" #include "lldb/API/SBFrame.h" @@ -1515,6 +1516,11 @@ return std::make_unique(*this); } +ScriptedThreadInterfaceSP +ScriptInterpreterPythonImpl::CreateScriptedThreadInterface() { + return std::make_shared(*this); +} + StructuredData::ObjectSP ScriptInterpreterPythonImpl::CreateStructuredDataFromScriptObject( ScriptObject obj) { diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h @@ -140,6 +140,7 @@ StructuredData::DictionarySP OSPlugin_RegisterInfo(StructuredData::ObjectSP os_plugin_object_sp) override; + lldb::ScriptedThreadInterfaceSP CreateScriptedThreadInterface() override; StructuredData::ArraySP OSPlugin_ThreadsInfo(StructuredData::ObjectSP os_plugin_object_sp) override;