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_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H
10#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H
11
12#include "lldb/Host/Config.h"
13
14#if LLDB_ENABLE_PYTHON
15
18
19namespace lldb_private {
20class ScriptedPlatformPythonInterface : public ScriptedPlatformInterface,
21 public ScriptedPythonInterface {
22public:
23 ScriptedPlatformPythonInterface(ScriptInterpreterPythonImpl &interpreter);
24
25 llvm::Expected<StructuredData::GenericSP>
26 CreatePluginObject(const llvm::StringRef class_name,
27 ExecutionContext &exe_ctx,
28 StructuredData::DictionarySP args_sp,
29 StructuredData::Generic *script_obj = nullptr) override;
30
31 llvm::SmallVector<llvm::StringLiteral> GetAbstractMethods() const override {
32 return llvm::SmallVector<llvm::StringLiteral>(
33 {"list_processes", "attach_to_process", "launch_process",
34 "kill_process"});
35 }
36
37 StructuredData::DictionarySP ListProcesses() override;
38
39 StructuredData::DictionarySP GetProcessInfo(lldb::pid_t) override;
40
42
43 Status LaunchProcess(lldb::ProcessLaunchInfoSP launch_info) override;
44
45 Status KillProcess(lldb::pid_t pid) override;
46};
47} // namespace lldb_private
48
49#endif // LLDB_ENABLE_PYTHON
50#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H
static Status AttachToProcess(ProcessAttachInfo &attach_info, Target &target)
Definition: SBTarget.cpp:77
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
std::shared_ptr< lldb_private::ProcessAttachInfo > ProcessAttachInfoSP
Definition: lldb-forward.h:382
uint64_t pid_t
Definition: lldb-types.h:81
std::shared_ptr< lldb_private::ProcessLaunchInfo > ProcessLaunchInfoSP
Definition: lldb-forward.h:383