LLVM 20.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 DebugObjectManagerPlugin. These two
27/// plugins will be merged in the near future.
28class GDBJITDebugInfoRegistrationPlugin : public ObjectLinkingLayer::Plugin {
29public:
31 public:
32 virtual ~DebugSectionSynthesizer() = default;
33 virtual Error startSynthesis() = 0;
35 };
36
38 Create(ExecutionSession &ES, JITDylib &ProcessJD, const Triple &TT);
39
41 : RegisterActionAddr(RegisterActionAddr) {}
42
45
47 ResourceKey SrcKey) override;
48
51 jitlink::PassConfiguration &PassConfig) override;
52
53private:
54 void modifyPassConfigForMachO(MaterializationResponsibility &MR,
56 jitlink::PassConfiguration &PassConfig);
57
58 ExecutorAddr RegisterActionAddr;
59};
60
61} // namespace orc
62} // namespace llvm
63
64#endif // LLVM_EXECUTIONENGINE_ORC_DEBUGGERSUPPORTPLUGIN_H
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
Tagged union holding either a T or a Error.
Definition: Error.h:481
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
An ExecutionSession represents a running JIT program.
Definition: Core.h:1339
Represents an address in the executor process.
For each object containing debug info, installs JITLink passes to synthesize a debug object and then ...
void modifyPassConfig(MaterializationResponsibility &MR, jitlink::LinkGraph &LG, jitlink::PassConfiguration &PassConfig) override
GDBJITDebugInfoRegistrationPlugin(ExecutorAddr RegisterActionAddr)
static Expected< std::unique_ptr< GDBJITDebugInfoRegistrationPlugin > > Create(ExecutionSession &ES, JITDylib &ProcessJD, const Triple &TT)
void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey, ResourceKey SrcKey) override
Error notifyRemovingResources(JITDylib &JD, ResourceKey K) override
Error notifyFailed(MaterializationResponsibility &MR) override
Represents a JIT'd dynamic library.
Definition: Core.h:897
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
Definition: Core.h:571
uintptr_t ResourceKey
Definition: Core.h:74
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18