1 //===----- RegisterEHFrames.h -- Register EH frame sections -----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // Support for dynamically registering and deregistering eh-frame sections
10 // in-process via libunwind.
12 // FIXME: The functionality in this file should be moved to the ORC runtime.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REGISTEREHFRAMES_H
17 #define LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REGISTEREHFRAMES_H
19 #include "llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h"
20 #include "llvm/Support/Error.h"
25 /// Register frames in the given eh-frame section with libunwind.
26 Error registerEHFrameSection(const void *EHFrameSectionAddr,
27 size_t EHFrameSectionSize);
29 /// Unregister frames in the given eh-frame section with libunwind.
30 Error deregisterEHFrameSection(const void *EHFrameSectionAddr,
31 size_t EHFrameSectionSize);
33 } // end namespace orc
34 } // end namespace llvm
36 extern "C" llvm::orc::shared::CWrapperFunctionResult
37 llvm_orc_registerEHFrameSectionWrapper(const char *Data, uint64_t Size);
39 extern "C" llvm::orc::shared::CWrapperFunctionResult
40 llvm_orc_deregisterEHFrameSectionWrapper(const char *Data, uint64_t Size);
42 #endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REGISTEREHFRAMES_H