LLVM  15.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 
20 namespace llvm {
21 namespace 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.
29 public:
31  public:
32  virtual ~DebugSectionSynthesizer() = default;
33  virtual Error startSynthesis() = 0;
34  virtual Error completeSynthesisAndRegister() = 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 
53 private:
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
llvm::orc::ExecutorAddr
Represents an address in the executor process.
Definition: ExecutorAddress.h:30
llvm::orc::ResourceKey
uintptr_t ResourceKey
Definition: Core.h:50
llvm::orc::MaterializationResponsibility
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
Definition: Core.h:519
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::orc::JITDylib
Represents a JIT'd dynamic library.
Definition: Core.h:946
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::orc::GDBJITDebugInfoRegistrationPlugin::GDBJITDebugInfoRegistrationPlugin
GDBJITDebugInfoRegistrationPlugin(ExecutorAddr RegisterActionAddr)
Definition: DebuggerSupportPlugin.h:40
llvm::orc::GDBJITDebugInfoRegistrationPlugin::modifyPassConfig
void modifyPassConfig(MaterializationResponsibility &MR, jitlink::LinkGraph &LG, jitlink::PassConfiguration &PassConfig) override
Definition: DebuggerSupportPlugin.cpp:400
llvm::orc::GDBJITDebugInfoRegistrationPlugin::notifyFailed
Error notifyFailed(MaterializationResponsibility &MR) override
Definition: DebuggerSupportPlugin.cpp:387
EPCDebugObjectRegistrar.h
llvm::orc::GDBJITDebugInfoRegistrationPlugin::notifyRemovingResources
Error notifyRemovingResources(ResourceKey K) override
Definition: DebuggerSupportPlugin.cpp:392
llvm::orc::GDBJITDebugInfoRegistrationPlugin::DebugSectionSynthesizer::startSynthesis
virtual Error startSynthesis()=0
llvm::orc::GDBJITDebugInfoRegistrationPlugin::DebugSectionSynthesizer
Definition: DebuggerSupportPlugin.h:30
llvm::orc::GDBJITDebugInfoRegistrationPlugin
For each object containing debug info, installs JITLink passes to synthesize a debug object and then ...
Definition: DebuggerSupportPlugin.h:28
llvm::orc::GDBJITDebugInfoRegistrationPlugin::DebugSectionSynthesizer::~DebugSectionSynthesizer
virtual ~DebugSectionSynthesizer()=default
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155
llvm::orc::ExecutionSession
An ExecutionSession represents a running JIT program.
Definition: Core.h:1358
Core.h
llvm::orc::ObjectLinkingLayer::Plugin
Plugin instances can be added to the ObjectLinkingLayer to receive callbacks when code is loaded or e...
Definition: ObjectLinkingLayer.h:60
ObjectLinkingLayer.h
llvm::orc::GDBJITDebugInfoRegistrationPlugin::notifyTransferringResources
void notifyTransferringResources(ResourceKey DstKey, ResourceKey SrcKey) override
Definition: DebuggerSupportPlugin.cpp:397
llvm::orc::GDBJITDebugInfoRegistrationPlugin::DebugSectionSynthesizer::completeSynthesisAndRegister
virtual Error completeSynthesisAndRegister()=0
llvm::orc::GDBJITDebugInfoRegistrationPlugin::Create
static Expected< std::unique_ptr< GDBJITDebugInfoRegistrationPlugin > > Create(ExecutionSession &ES, JITDylib &ProcessJD, const Triple &TT)
Definition: DebuggerSupportPlugin.cpp:372