LLDB mainline
OperatingSystemPythonInterface.h
Go to the documentation of this file.
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_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_H
11
13
15
16#include <optional>
17
18namespace lldb_private {
20 : virtual public OperatingSystemInterface,
21 virtual public ScriptedThreadPythonInterface,
22 public PluginInterface {
23public:
25
26 llvm::Expected<StructuredData::GenericSP>
27 CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx,
29 StructuredData::Generic *script_obj = nullptr) override;
30
31 llvm::SmallVector<AbstractMethodRequirement>
33 return llvm::SmallVector<AbstractMethodRequirement>({{"get_thread_info"}});
34 }
35
37 lldb::addr_t context) override;
38
40
42
43 std::optional<std::string> GetRegisterContextForTID(lldb::tid_t tid) override;
44
45 std::optional<bool> DoesPluginReportAllThreads() override;
46
47 static void Initialize();
48
49 static void Terminate();
50
51 static llvm::StringRef GetPluginNameStatic() {
52 return "OperatingSystemPythonInterface";
53 }
54
55 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
56};
57} // namespace lldb_private
58
59#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_H
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_obj=nullptr) override
StructuredData::DictionarySP GetRegisterInfo() override
std::optional< std::string > GetRegisterContextForTID(lldb::tid_t tid) override
OperatingSystemPythonInterface(ScriptInterpreterPythonImpl &interpreter)
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
StructuredData::DictionarySP CreateThread(lldb::tid_t tid, lldb::addr_t context) override
ScriptedThreadPythonInterface(ScriptInterpreterPythonImpl &interpreter)
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Array > ArraySP
A class that represents a running process on the host machine.
uint64_t addr_t
Definition lldb-types.h:80
uint64_t tid_t
Definition lldb-types.h:84