LLDB mainline
ScriptedThreadPythonInterface.h
Go to the documentation of this file.
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_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
11
14#include <optional>
15
16namespace lldb_private {
19 virtual public PluginInterface {
20public:
22
23 llvm::Expected<StructuredData::GenericSP>
24 CreatePluginObject(const ScriptedMetadata &scripted_metadata,
25 ExecutionContext &exe_ctx,
26 StructuredData::Generic *script_obj = nullptr) override;
27
28 llvm::SmallVector<AbstractMethodRequirement>
30 return llvm::SmallVector<AbstractMethodRequirement>(
31 {{"get_stop_reason"}, {"get_register_context"}});
32 }
33
34 lldb::tid_t GetThreadID() override;
35
36 std::optional<std::string> GetName() override;
37
38 lldb::StateType GetState() override;
39
40 std::optional<std::string> GetQueue() override;
41
43
45
47
48 std::optional<std::string> GetRegisterContext() override;
49
51
52 std::optional<std::string> GetScriptedFramePluginName() override;
53
54 static void Initialize();
55
56 static void Terminate();
57
58 static llvm::StringRef GetPluginNameStatic() {
59 return "ScriptedThreadPythonInterface";
60 }
61
62 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
63
64protected:
66};
67} // namespace lldb_private
68
69#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
std::optional< std::string > GetScriptedFramePluginName() override
StructuredData::DictionarySP GetStopReason() override
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
StructuredData::DictionarySP GetRegisterInfo() override
std::optional< std::string > GetRegisterContext() override
ScriptedThreadPythonInterface(ScriptInterpreterPythonImpl &interpreter)
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, ExecutionContext &exe_ctx, StructuredData::Generic *script_obj=nullptr) override
lldb::ScriptedFrameInterfaceSP CreateScriptedFrameInterface() override
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Array > ArraySP
A class that represents a running process on the host machine.
StateType
Process and Thread States.
uint64_t tid_t
Definition lldb-types.h:84
std::shared_ptr< lldb_private::ScriptedFrameInterface > ScriptedFrameInterfaceSP