LLVM 22.0.0git
DebuggerSupportPlugin.h
Go to the documentation of this file.
1//===--- DebugerSupportPlugin.h -- Utils for debugger support ---*- 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// Generates debug objects and registers them using the jit-loader-gdb protocol.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_DEBUGGERSUPPORTPLUGIN_H
14#define LLVM_EXECUTIONENGINE_ORC_DEBUGGERSUPPORTPLUGIN_H
15
19
20namespace llvm {
21namespace orc {
22
23/// For each object containing debug info, installs JITLink passes to synthesize
24/// a debug object and then register it via the GDB JIT-registration interface.
25///
26/// Currently MachO only. For ELF use ELFDebugObjectPlugin. These two
27/// plugins will be merged in the near future.
30public:
32 public:
33 virtual ~DebugSectionSynthesizer() = default;
34 virtual Error startSynthesis() = 0;
36 };
37
39 Create(ExecutionSession &ES, JITDylib &ProcessJD, const Triple &TT);
40
42 : RegisterActionAddr(RegisterActionAddr) {}
43
44 Error notifyFailed(MaterializationResponsibility &MR) override;
45 Error notifyRemovingResources(JITDylib &JD, ResourceKey K) override;
46
47 void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey,
48 ResourceKey SrcKey) override;
49
50 void modifyPassConfig(MaterializationResponsibility &MR,
52 jitlink::PassConfiguration &PassConfig) override;
53
54private:
55 void modifyPassConfigForMachO(MaterializationResponsibility &MR,
57 jitlink::PassConfiguration &PassConfig);
58
59 ExecutorAddr RegisterActionAddr;
60};
61
62} // namespace orc
63} // namespace llvm
64
65#endif // LLVM_EXECUTIONENGINE_ORC_DEBUGGERSUPPORTPLUGIN_H
#define LLVM_ABI
Definition Compiler.h:213
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
Tagged union holding either a T or a Error.
Definition Error.h:485
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
An ExecutionSession represents a running JIT program.
Definition Core.h:1342
Represents an address in the executor process.
GDBJITDebugInfoRegistrationPlugin(ExecutorAddr RegisterActionAddr)
static Expected< std::unique_ptr< GDBJITDebugInfoRegistrationPlugin > > Create(ExecutionSession &ES, JITDylib &ProcessJD, const Triple &TT)
Represents a JIT'd dynamic library.
Definition Core.h:906
Plugin instances can be added to the ObjectLinkingLayer to receive callbacks when code is loaded or e...
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
Definition Core.h:580
uintptr_t ResourceKey
Definition Core.h:79
This is an optimization pass for GlobalISel generic memory operations.