LLVM  14.0.0git
RegisterEHFrames.h
Go to the documentation of this file.
1 //===----- RegisterEHFrames.h -- Register EH frame sections -----*- 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 // Support for dynamically registering and deregistering eh-frame sections
10 // in-process via libunwind.
11 //
12 // FIXME: The functionality in this file should be moved to the ORC runtime.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REGISTEREHFRAMES_H
17 #define LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REGISTEREHFRAMES_H
18 
20 #include "llvm/Support/Error.h"
21 
22 namespace llvm {
23 namespace orc {
24 
25 /// Register frames in the given eh-frame section with libunwind.
26 Error registerEHFrameSection(const void *EHFrameSectionAddr,
27  size_t EHFrameSectionSize);
28 
29 /// Unregister frames in the given eh-frame section with libunwind.
30 Error deregisterEHFrameSection(const void *EHFrameSectionAddr,
31  size_t EHFrameSectionSize);
32 
33 } // end namespace orc
34 } // end namespace llvm
35 
36 /// An eh-frame registration utility suitable for use as a support function
37 /// call. This function expects the direct address and size of the eh-frame
38 /// section to register as its arguments (it does not treat its arguments as
39 /// pointers to an SPS-serialized arg buffer).
42  const char *EHFrameSectionAddr, uint64_t Size);
43 
44 /// An eh-frame deregistration utility suitable for use as a support function
45 /// call. This function expects the direct address and size of the eh-frame
46 /// section to register as its arguments (it does not treat its arguments as
47 /// pointers to an SPS-serialized arg buffer).
50  const char *EHFrameSectionAddr, uint64_t Size);
51 
54 
57 
58 #endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REGISTEREHFRAMES_H
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::lltok::Error
@ Error
Definition: LLToken.h:21
llvm::orc::shared::CWrapperFunctionResult
Definition: WrapperFunctionUtils.h:33
llvm_orc_registerEHFrameSectionWrapper
llvm::orc::shared::CWrapperFunctionResult llvm_orc_registerEHFrameSectionWrapper(const char *Data, uint64_t Size)
Definition: RegisterEHFrames.cpp:188
Error.h
WrapperFunctionUtils.h
llvm::orc::deregisterEHFrameSection
Error deregisterEHFrameSection(const void *EHFrameSectionAddr, size_t EHFrameSectionSize)
Unregister frames in the given eh-frame section with libunwind.
Definition: RegisterEHFrames.cpp:147
llvm::Data
@ Data
Definition: SIMachineScheduler.h:55
uint64_t
llvm_orc_deregisterEHFrameSectionCustomDirectWrapper
llvm::orc::shared::CWrapperFunctionResult llvm_orc_deregisterEHFrameSectionCustomDirectWrapper(const char *EHFrameSectionAddr, uint64_t Size)
An eh-frame deregistration utility suitable for use as a support function call.
Definition: RegisterEHFrames.cpp:171
llvm_orc_deregisterEHFrameSectionWrapper
llvm::orc::shared::CWrapperFunctionResult llvm_orc_deregisterEHFrameSectionWrapper(const char *Data, uint64_t Size)
Definition: RegisterEHFrames.cpp:195
llvm_orc_registerEHFrameSectionCustomDirectWrapper
llvm::orc::shared::CWrapperFunctionResult llvm_orc_registerEHFrameSectionCustomDirectWrapper(const char *EHFrameSectionAddr, uint64_t Size)
An eh-frame registration utility suitable for use as a support function call.
Definition: RegisterEHFrames.cpp:162
llvm::orc::registerEHFrameSection
Error registerEHFrameSection(const void *EHFrameSectionAddr, size_t EHFrameSectionSize)
Register frames in the given eh-frame section with libunwind.
Definition: RegisterEHFrames.cpp:128