LLVM 20.0.0git
EPCEHFrameRegistrar.h
Go to the documentation of this file.
1//===-- EPCEHFrameRegistrar.h - EPC based eh-frame registration -*- 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// ExecutorProcessControl based eh-frame registration.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_EPCEHFRAMEREGISTRAR_H
14#define LLVM_EXECUTIONENGINE_ORC_EPCEHFRAMEREGISTRAR_H
15
18
19namespace llvm {
20namespace orc {
21
22class ExecutionSession;
23
24/// Register/Deregisters EH frames in a remote process via a
25/// ExecutorProcessControl instance.
27public:
28 /// Create from a ExecutorProcessControl instance alone. This will use
29 /// the EPC's lookupSymbols method to find the registration/deregistration
30 /// function addresses by name.
31 ///
32 /// If RegistrationFunctionsDylib is non-None then it will be searched to
33 /// find the registration functions. If it is None then the process dylib
34 /// will be loaded to find the registration functions.
37
38 /// Create a EPCEHFrameRegistrar with the given ExecutorProcessControl
39 /// object and registration/deregistration function addresses.
41 ExecutorAddr RegisterEHFrameSectionWrapper,
42 ExecutorAddr DeregisterEHFRameSectionWrapper)
43 : ES(ES), RegisterEHFrameSectionWrapper(RegisterEHFrameSectionWrapper),
44 DeregisterEHFrameSectionWrapper(DeregisterEHFRameSectionWrapper) {}
45
46 Error registerEHFrames(ExecutorAddrRange EHFrameSection) override;
47 Error deregisterEHFrames(ExecutorAddrRange EHFrameSection) override;
48
49private:
51 ExecutorAddr RegisterEHFrameSectionWrapper;
52 ExecutorAddr DeregisterEHFrameSectionWrapper;
53};
54
55} // end namespace orc
56} // end namespace llvm
57
58#endif // LLVM_EXECUTIONENGINE_ORC_EPCEHFRAMEREGISTRAR_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
Register/Deregisters EH frames in a remote process via a ExecutorProcessControl instance.
static Expected< std::unique_ptr< EPCEHFrameRegistrar > > Create(ExecutionSession &ES)
Create from a ExecutorProcessControl instance alone.
Error deregisterEHFrames(ExecutorAddrRange EHFrameSection) override
EPCEHFrameRegistrar(ExecutionSession &ES, ExecutorAddr RegisterEHFrameSectionWrapper, ExecutorAddr DeregisterEHFRameSectionWrapper)
Create a EPCEHFrameRegistrar with the given ExecutorProcessControl object and registration/deregistra...
Error registerEHFrames(ExecutorAddrRange EHFrameSection) override
An ExecutionSession represents a running JIT program.
Definition: Core.h:1431
Represents an address in the executor process.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Represents an address range in the exceutor process.