LLDB mainline
LLDBServerAcceleratorPlugin.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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_PROCESS_GDB_REMOTE_LLDBSERVERACCELERATORPLUGIN_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_LLDBSERVERACCELERATORPLUGIN_H
11
12#include "lldb/Host/MainLoop.h"
15#include "llvm/ADT/StringRef.h"
16#include <memory>
17#include <optional>
18
19namespace lldb_private {
20
21namespace process_gdb_remote {
23} // namespace process_gdb_remote
24
25namespace lldb_server {
26
28public:
31
32 LLDBServerAcceleratorPlugin(GDBServer &native_gdb_server,
33 MainLoop &native_main_loop);
35
36 virtual llvm::StringRef GetPluginName() = 0;
37
38 virtual std::optional<AcceleratorActions> GetInitializeActions() = 0;
39
40 virtual llvm::Expected<AcceleratorBreakpointHitResponse>
42
43 /// Create an AcceleratorActions with an identifier unique within this plugin,
44 /// so identifiers from different actions don't collide.
49
50 virtual std::optional<AcceleratorDynamicLoaderResponse>
52 return std::nullopt;
53 }
54
55protected:
58 std::unique_ptr<Manager> m_process_manager_up;
59 std::unique_ptr<GDBServer> m_accelerator_gdb_server;
61};
62
63} // namespace lldb_server
64} // namespace lldb_private
65
66#endif // LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_LLDBSERVERACCELERATORPLUGIN_H
virtual std::optional< AcceleratorActions > GetInitializeActions()=0
virtual llvm::Expected< AcceleratorBreakpointHitResponse > BreakpointWasHit(AcceleratorBreakpointHitArgs &args)=0
virtual std::optional< AcceleratorDynamicLoaderResponse > GetDynamicLoaderLibraryInfos(const AcceleratorDynamicLoaderArgs &args)
LLDBServerAcceleratorPlugin(GDBServer &native_gdb_server, MainLoop &native_main_loop)
AcceleratorActions GetNewAcceleratorAction()
Create an AcceleratorActions with an identifier unique within this plugin, so identifiers from differ...
process_gdb_remote::GDBRemoteCommunicationServerLLGS GDBServer
A class that represents a running process on the host machine.
MainLoopPosix MainLoop
Definition MainLoop.h:20
Actions to be performed in the native process on behalf of an accelerator plugin.
Sent by the client when a plugin-requested breakpoint is hit.
Arguments for the jAcceleratorPluginGetDynamicLoaderLibraryInfo packet.