Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/OperatingSystemPythonInterface.h
39688 views
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
16
#include "ScriptedThreadPythonInterface.h"
17
#include "lldb/Interpreter/Interfaces/OperatingSystemInterface.h"
18
#include <optional>
19
20
namespace lldb_private {
21
class OperatingSystemPythonInterface
22
: virtual public OperatingSystemInterface,
23
virtual public ScriptedThreadPythonInterface {
24
public:
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
49
50