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_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
18#include <optional>
19
20namespace lldb_private {
21class OperatingSystemPythonInterface
22 : virtual public OperatingSystemInterface,
23 virtual public ScriptedThreadPythonInterface {
24public:
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 llvm::SmallVector<llvm::StringLiteral> GetAbstractMethods() const override {
33 return llvm::SmallVector<llvm::StringLiteral>({"get_thread_info"});
34 }
35
36 StructuredData::DictionarySP CreateThread(lldb::tid_t tid,
37 lldb::addr_t context) override;
38
39 StructuredData::ArraySP GetThreadInfo() override;
40
41 StructuredData::DictionarySP GetRegisterInfo() override;
42
43 std::optional<std::string> GetRegisterContextForTID(lldb::tid_t tid) override;
44};
45} // namespace lldb_private
46
47#endif // LLDB_ENABLE_PYTHON
48#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_H
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
uint64_t addr_t
Definition: lldb-types.h:79
uint64_t tid_t
Definition: lldb-types.h:82