1 //===-- OperatingSystemPythonInterface.h ------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_H 10 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_H 11 12 #include "lldb/Host/Config.h" 13 14 #if LLDB_ENABLE_PYTHON 15 16 #include "ScriptedThreadPythonInterface.h" 17 #include "lldb/Interpreter/Interfaces/OperatingSystemInterface.h" 18 #include <optional> 19 20 namespace lldb_private { 21 class OperatingSystemPythonInterface 22 : virtual public OperatingSystemInterface, 23 virtual public ScriptedThreadPythonInterface { 24 public: 25 OperatingSystemPythonInterface(ScriptInterpreterPythonImpl &interpreter); 26 27 llvm::Expected<StructuredData::GenericSP> 28 CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, 29 StructuredData::DictionarySP args_sp, 30 StructuredData::Generic *script_obj = nullptr) override; 31 32 StructuredData::DictionarySP CreateThread(lldb::tid_t tid, 33 lldb::addr_t context) override; 34 35 StructuredData::ArraySP GetThreadInfo() override; 36 37 StructuredData::DictionarySP GetRegisterInfo() override; 38 39 std::optional<std::string> GetRegisterContextForTID(lldb::tid_t tid) override; 40 }; 41 } // namespace lldb_private 42 43 #endif // LLDB_ENABLE_PYTHON 44 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_H 45