1 //===-- ScriptedThreadPythonInterface.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_SCRIPTEDTHREADPYTHONINTERFACE_H
10 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
11 
12 #include "lldb/Host/Config.h"
13 
14 #if LLDB_ENABLE_PYTHON
15 
16 #include "ScriptedPythonInterface.h"
17 #include "lldb/Interpreter/Interfaces/ScriptedThreadInterface.h"
18 #include <optional>
19 
20 namespace lldb_private {
21 class ScriptedThreadPythonInterface : public ScriptedThreadInterface,
22                                       public ScriptedPythonInterface {
23 public:
24   ScriptedThreadPythonInterface(ScriptInterpreterPythonImpl &interpreter);
25 
26   StructuredData::GenericSP
27   CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx,
28                      StructuredData::DictionarySP args_sp,
29                      StructuredData::Generic *script_obj = nullptr) override;
30 
31   lldb::tid_t GetThreadID() override;
32 
33   std::optional<std::string> GetName() override;
34 
35   lldb::StateType GetState() override;
36 
37   std::optional<std::string> GetQueue() override;
38 
39   StructuredData::DictionarySP GetStopReason() override;
40 
41   StructuredData::ArraySP GetStackFrames() override;
42 
43   StructuredData::DictionarySP GetRegisterInfo() override;
44 
45   std::optional<std::string> GetRegisterContext() override;
46 
47   StructuredData::ArraySP GetExtendedInfo() override;
48 };
49 } // namespace lldb_private
50 
51 #endif // LLDB_ENABLE_PYTHON
52 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
53