LLDB mainline
ScriptedProcessPythonInterface.h
Go to the documentation of this file.
1//===-- ScriptedProcessPythonInterface.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_SCRIPTEDPROCESSPYTHONINTERFACE_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H
11
13
15
16#include <optional>
17
18namespace lldb_private {
21 public PluginInterface {
22public:
24
25 llvm::Expected<StructuredData::GenericSP>
26 CreatePluginObject(const ScriptedMetadata &scripted_metadata,
27 ExecutionContext &exe_ctx,
28 StructuredData::Generic *script_obj = nullptr) override;
29
30 llvm::SmallVector<AbstractMethodRequirement>
32 return llvm::SmallVector<AbstractMethodRequirement>(
33 {{"read_memory_at_address", 4},
34 {"is_alive"},
35 {"get_scripted_thread_plugin"}});
36 }
37
39
41
42 Status Attach(const ProcessAttachInfo &attach_info) override;
43
44 Status Launch() override;
45
46 Status Resume() override;
47
48 std::optional<MemoryRegionInfo>
50 Status &error) override;
51
53
54 bool CreateBreakpoint(lldb::addr_t addr, Status &error) override;
55
57 Status &error) override;
58
61 Status &error) override;
62
64
65 lldb::pid_t GetProcessID() override;
66
67 bool IsAlive() override;
68
69 std::optional<std::string> GetScriptedThreadPluginName() override;
70
72
73 static void Initialize();
74
75 static void Terminate();
76
77 static llvm::StringRef GetPluginNameStatic() {
78 return "ScriptedProcessPythonInterface";
79 }
80
81 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
82
83private:
85};
86} // namespace lldb_private
87
88#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H
static llvm::raw_ostream & error(Stream &strm)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
StructuredData::DictionarySP GetThreadsInfo() override
lldb::ScriptedThreadInterfaceSP CreateScriptedThreadInterface() override
lldb::DataExtractorSP ReadMemoryAtAddress(lldb::addr_t address, size_t size, Status &error) override
std::optional< std::string > GetScriptedThreadPluginName() override
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, ExecutionContext &exe_ctx, StructuredData::Generic *script_obj=nullptr) override
StructuredData::DictionarySP GetAddressableBits() override
The number of bits this process uses for addressing, as a dictionary with optional "lowmem" and "high...
bool CreateBreakpoint(lldb::addr_t addr, Status &error) override
Status Attach(const ProcessAttachInfo &attach_info) override
std::optional< MemoryRegionInfo > GetMemoryRegionContainingAddress(lldb::addr_t address, Status &error) override
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
lldb::offset_t WriteMemoryAtAddress(lldb::addr_t addr, lldb::DataExtractorSP data_sp, Status &error) override
ScriptedProcessPythonInterface(ScriptInterpreterPythonImpl &interpreter)
StructuredData::DictionarySP GetCapabilities() override
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
An error handling class.
Definition Status.h:118
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Array > ArraySP
A class that represents a running process on the host machine.
uint64_t offset_t
Definition lldb-types.h:86
std::shared_ptr< lldb_private::ScriptedThreadInterface > ScriptedThreadInterfaceSP
uint64_t pid_t
Definition lldb-types.h:84
uint64_t addr_t
Definition lldb-types.h:80
std::shared_ptr< lldb_private::DataExtractor > DataExtractorSP