LLVM  13.0.0git
TPCEHFrameRegistrar.h
Go to the documentation of this file.
1 //===-- TPCEHFrameRegistrar.h - TPC 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 // TargetProcessControl based eh-frame registration.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_EXECUTIONENGINE_ORC_TPCEHFRAMEREGISTRAR_H
14 #define LLVM_EXECUTIONENGINE_ORC_TPCEHFRAMEREGISTRAR_H
15 
18 
19 namespace llvm {
20 namespace orc {
21 
22 /// Register/Deregisters EH frames in a remote process via a
23 /// TargetProcessControl instance.
25 public:
26  /// Create from a TargetProcessControl instance alone. This will use
27  /// the TPC's lookupSymbols method to find the registration/deregistration
28  /// funciton addresses by name.
31 
32  /// Create a TPCEHFrameRegistrar with the given TargetProcessControl
33  /// object and registration/deregistration function addresses.
35  JITTargetAddress RegisterEHFrameWrapperFnAddr,
36  JITTargetAddress DeregisterEHFRameWrapperFnAddr)
37  : TPC(TPC), RegisterEHFrameWrapperFnAddr(RegisterEHFrameWrapperFnAddr),
38  DeregisterEHFrameWrapperFnAddr(DeregisterEHFRameWrapperFnAddr) {}
39 
40  Error registerEHFrames(JITTargetAddress EHFrameSectionAddr,
41  size_t EHFrameSectionSize) override;
42  Error deregisterEHFrames(JITTargetAddress EHFrameSectionAddr,
43  size_t EHFrameSectionSize) override;
44 
45 private:
47  JITTargetAddress RegisterEHFrameWrapperFnAddr;
48  JITTargetAddress DeregisterEHFrameWrapperFnAddr;
49 };
50 
51 } // end namespace orc
52 } // end namespace llvm
53 
54 #endif // LLVM_EXECUTIONENGINE_ORC_TPCEHFRAMEREGISTRAR_H
llvm
Definition: AllocatorList.h:23
llvm::orc::TPCEHFrameRegistrar::registerEHFrames
Error registerEHFrames(JITTargetAddress EHFrameSectionAddr, size_t EHFrameSectionSize) override
Definition: TPCEHFrameRegistrar.cpp:53
llvm::orc::TPCEHFrameRegistrar::TPCEHFrameRegistrar
TPCEHFrameRegistrar(TargetProcessControl &TPC, JITTargetAddress RegisterEHFrameWrapperFnAddr, JITTargetAddress DeregisterEHFRameWrapperFnAddr)
Create a TPCEHFrameRegistrar with the given TargetProcessControl object and registration/deregistrati...
Definition: TPCEHFrameRegistrar.h:34
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
EHFrameSupport.h
llvm::orc::TPCEHFrameRegistrar::Create
static Expected< std::unique_ptr< TPCEHFrameRegistrar > > Create(TargetProcessControl &TPC)
Create from a TargetProcessControl instance alone.
Definition: TPCEHFrameRegistrar.cpp:16
llvm::orc::TargetProcessControl
TargetProcessControl supports interaction with a JIT target process.
Definition: TargetProcessControl.h:32
llvm::orc::TPCEHFrameRegistrar::deregisterEHFrames
Error deregisterEHFrames(JITTargetAddress EHFrameSectionAddr, size_t EHFrameSectionSize) override
Definition: TPCEHFrameRegistrar.cpp:66
TargetProcessControl.h
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::JITTargetAddress
uint64_t JITTargetAddress
Represents an address in the target process's address space.
Definition: JITSymbol.h:42
llvm::orc::TPCEHFrameRegistrar
Register/Deregisters EH frames in a remote process via a TargetProcessControl instance.
Definition: TPCEHFrameRegistrar.h:24