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
16#include "ScriptedPythonInterface.h"
17#include "lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h"
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
41 Status AttachToProcess(lldb::ProcessAttachInfoSP attach_info) override;
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
51

source code of lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h