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
20
21namespace llvm {
22namespace orc {
23
24/// For each object containing debug info, installs JITLink passes to synthesize
25/// a debug object and then register it via the GDB JIT-registration interface.
26///
27/// Currently MachO only. For ELF use DebugObjectManagerPlugin. These two
28/// plugins will be merged in the near future.
30 : public ObjectLinkingLayer::Plugin {
31public:
33 public:
34 virtual ~DebugSectionSynthesizer() = default;
35 virtual Error startSynthesis() = 0;
37 };
38
40 Create(ExecutionSession &ES, JITDylib &ProcessJD, const Triple &TT);
41
43 : RegisterActionAddr(RegisterActionAddr) {}
44
45 Error notifyFailed(MaterializationResponsibility &MR) override;
46 Error notifyRemovingResources(JITDylib &JD, ResourceKey K) override;
47
48 void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey,
49 ResourceKey SrcKey) override;
50
51 void modifyPassConfig(MaterializationResponsibility &MR,
53 jitlink::PassConfiguration &PassConfig) override;
54
55private:
56 void modifyPassConfigForMachO(MaterializationResponsibility &MR,
58 jitlink::PassConfiguration &PassConfig);
59
60 ExecutorAddr RegisterActionAddr;
61};
62
63} // namespace orc
64} // namespace llvm
65
66#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:1355
Represents an address in the executor process.
For each object containing debug info, installs JITLink passes to synthesize a debug object and then ...
GDBJITDebugInfoRegistrationPlugin(ExecutorAddr RegisterActionAddr)
Represents a JIT'd dynamic library.
Definition: Core.h:902
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
Definition: Core.h:576
uintptr_t ResourceKey
Definition: Core.h:75
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18