LLDB mainline
ScriptedPlatformInterface.h
Go to the documentation of this file.
1//===-- ScriptedPlatformInterface.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_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H
10#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H
11
14
15#include "lldb/lldb-private.h"
16
17#include <string>
18
19namespace lldb_private {
21public:
22 virtual llvm::Expected<StructuredData::GenericSP>
23 CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx,
25 StructuredData::Generic *script_obj = nullptr) = 0;
26
28
30 return {};
31 }
32
34 return Status("ScriptedPlatformInterface cannot attach to a process");
35 }
36
38 return Status("ScriptedPlatformInterface cannot launch process");
39 }
40
42 return Status("ScriptedPlatformInterface cannot kill process");
43 }
44};
45} // namespace lldb_private
46
47#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
virtual Status LaunchProcess(lldb::ProcessLaunchInfoSP launch_info)
virtual StructuredData::DictionarySP GetProcessInfo(lldb::pid_t)
virtual Status AttachToProcess(lldb::ProcessAttachInfoSP attach_info)
virtual StructuredData::DictionarySP ListProcesses()
virtual Status KillProcess(lldb::pid_t pid)
virtual llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_obj=nullptr)=0
An error handling class.
Definition: Status.h:44
std::shared_ptr< Dictionary > DictionarySP
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