LLDB mainline
ScriptedPlatformPythonInterface.h
Go to the documentation of this file.
1//===-- ScriptedPlatformPythonInterface.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_SCRIPTEDPLATFORMPYTHONINTERFACE_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H
11
13
15
16namespace lldb_private {
19 public PluginInterface {
20public:
22
23 llvm::Expected<StructuredData::GenericSP>
24 CreatePluginObject(const llvm::StringRef class_name,
25 ExecutionContext &exe_ctx,
27 StructuredData::Generic *script_obj = nullptr) override;
28
29 llvm::SmallVector<AbstractMethodRequirement>
31 return llvm::SmallVector<AbstractMethodRequirement>(
32 {{"list_processes"},
33 {"attach_to_process", 2},
34 {"launch_process", 2},
35 {"kill_process", 2}});
36 }
37
39
41
43
45
46 Status KillProcess(lldb::pid_t pid) override;
47
48 static void Initialize();
49
50 static void Terminate();
51
52 static llvm::StringRef GetPluginNameStatic() {
53 return "ScriptedPlatformPythonInterface";
54 }
55
56 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
57};
58} // namespace lldb_private
59
60#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
StructuredData::DictionarySP GetProcessInfo(lldb::pid_t) override
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_obj=nullptr) override
Status LaunchProcess(lldb::ProcessLaunchInfoSP launch_info) override
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
ScriptedPlatformPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Status AttachToProcess(lldb::ProcessAttachInfoSP attach_info) override
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
An error handling class.
Definition Status.h:118
std::shared_ptr< Dictionary > DictionarySP
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ProcessAttachInfo > ProcessAttachInfoSP
uint64_t pid_t
Definition lldb-types.h:83
std::shared_ptr< lldb_private::ProcessLaunchInfo > ProcessLaunchInfoSP