1 //===-- ScriptedThreadPythonInterface.h ------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
10 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
12 #include "lldb/Host/Config.h"
14 #if LLDB_ENABLE_PYTHON
16 #include "ScriptedPythonInterface.h"
17 #include "lldb/Interpreter/Interfaces/ScriptedThreadInterface.h"
20 namespace lldb_private
{
21 class ScriptedThreadPythonInterface
: public ScriptedThreadInterface
,
22 public ScriptedPythonInterface
{
24 ScriptedThreadPythonInterface(ScriptInterpreterPythonImpl
&interpreter
);
26 llvm::Expected
<StructuredData::GenericSP
>
27 CreatePluginObject(llvm::StringRef class_name
, ExecutionContext
&exe_ctx
,
28 StructuredData::DictionarySP args_sp
,
29 StructuredData::Generic
*script_obj
= nullptr) override
;
31 llvm::SmallVector
<AbstractMethodRequirement
>
32 GetAbstractMethodRequirements() const override
{
33 return llvm::SmallVector
<AbstractMethodRequirement
>(
34 {{"get_stop_reason"}, {"get_register_context"}});
37 lldb::tid_t
GetThreadID() override
;
39 std::optional
<std::string
> GetName() override
;
41 lldb::StateType
GetState() override
;
43 std::optional
<std::string
> GetQueue() override
;
45 StructuredData::DictionarySP
GetStopReason() override
;
47 StructuredData::ArraySP
GetStackFrames() override
;
49 StructuredData::DictionarySP
GetRegisterInfo() override
;
51 std::optional
<std::string
> GetRegisterContext() override
;
53 StructuredData::ArraySP
GetExtendedInfo() override
;
55 } // namespace lldb_private
57 #endif // LLDB_ENABLE_PYTHON
58 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H