12#ifndef __CLANG_UNWIND_H
13#define __CLANG_UNWIND_H
15#if defined(__APPLE__) && __has_include_next(<unwind.h>)
20# define _SHOULD_UNDEFINE_GNU_SOURCE
30# include_next <unwind.h>
32# pragma GCC visibility push(default)
33# include_next <unwind.h>
34# pragma GCC visibility pop
36# ifdef _SHOULD_UNDEFINE_GNU_SOURCE
38# undef _SHOULD_UNDEFINE_GNU_SOURCE
52#pragma GCC visibility push(default)
64struct _Unwind_Context;
65#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || \
66 defined(__ARM_DWARF_EH__) || defined(__SEH__))
67struct _Unwind_Control_Block;
68typedef struct _Unwind_Control_Block _Unwind_Control_Block;
69#define _Unwind_Exception _Unwind_Control_Block
76#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
77 !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
90#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
91 !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
108#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || \
109 defined(__ARM_DWARF_EH__) || defined(__SEH__))
110typedef struct _Unwind_Control_Block _Unwind_Control_Block;
111typedef uint32_t _Unwind_EHT_Header;
113struct _Unwind_Control_Block {
136 _Unwind_EHT_Header *ehtp;
146#if !defined (__USING_SJLJ_EXCEPTIONS__) && defined (__SEH__)
147 _Unwind_Word private_[6];
161 struct _Unwind_Context *,
167 struct _Unwind_Context *);
173#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || \
174 defined(__ARM_DWARF_EH__) || defined(__SEH__))
181} _Unwind_VRS_RegClass;
189} _Unwind_VRS_DataRepresentation;
193 _UVRSR_NOT_IMPLEMENTED = 1,
198#define _US_VIRTUAL_UNWIND_FRAME ((_Unwind_State)0)
199#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
200#define _US_UNWIND_FRAME_RESUME ((_Unwind_State)2)
201#define _US_ACTION_MASK ((_Unwind_State)3)
202#define _US_FORCE_UNWIND ((_Unwind_State)8)
204_Unwind_VRS_Result _Unwind_VRS_Get(
struct _Unwind_Context *__context,
205 _Unwind_VRS_RegClass __regclass,
207 _Unwind_VRS_DataRepresentation __representation,
210_Unwind_VRS_Result _Unwind_VRS_Set(
struct _Unwind_Context *__context,
211 _Unwind_VRS_RegClass __regclass,
213 _Unwind_VRS_DataRepresentation __representation,
217_Unwind_Word
_Unwind_GetGR(
struct _Unwind_Context *__context,
int __index) {
219 _Unwind_VRS_Get(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &
__value);
224void _Unwind_SetGR(
struct _Unwind_Context *__context,
int __index,
226 _Unwind_VRS_Set(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &
__value);
230_Unwind_Word
_Unwind_GetIP(
struct _Unwind_Context *__context) {
232 return __ip & ~(_Unwind_Word)(0x1);
237 _Unwind_Word __thumb_mode_bit =
_Unwind_GetGR(__context, 15) & 0x1;
260#if !defined(__APPLE__) || !defined(__arm__)
293void __register_frame(
const void *);
294void __deregister_frame(
const void *);
296struct dwarf_eh_bases {
301void *_Unwind_Find_FDE(
const void *,
struct dwarf_eh_bases *);
303void __register_frame_info_bases(
const void *,
void *,
void *,
void *)
305void __register_frame_info(
const void *,
void *)
__attribute__((__unavailable__));
306void __register_frame_info_table_bases(
const void *,
void*,
void *,
void *)
308void __register_frame_info_table(
const void *,
void *)
310void __register_frame_table(
const void *)
__attribute__((__unavailable__));
311void __deregister_frame_info(
const void *)
__attribute__((__unavailable__));
312void __deregister_frame_info_bases(
const void *)
__attribute__((__unavailable__));
323#pragma GCC visibility pop
static __inline__ void unsigned int __value
__INTPTR_TYPE__ intptr_t
A signed integer type with the property that any valid pointer to void can be converted to this type,...
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
_Unwind_Exception_Cleanup_Fn exception_cleanup
_Unwind_Exception_Class exception_class
_Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn, void *)
_Unwind_Exception_Cleanup_Fn exception_cleanup
_Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(_Unwind_Exception *)
@ _URC_FATAL_PHASE2_ERROR
@ _URC_FATAL_PHASE1_ERROR
@ _URC_FOREIGN_EXCEPTION_CAUGHT
uint64_t _Unwind_Exception_Class
_Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *)
void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Word)
_Unwind_Word _Unwind_GetCFA(struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn, void *)
_Unwind_Word _Unwind_GetIP(struct _Unwind_Context *)
void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Word)
void _Unwind_DeleteException(_Unwind_Exception *)
uintptr_t _Unwind_Internal_Ptr
void _Unwind_Resume(_Unwind_Exception *)
_Unwind_Reason_Code(* _Unwind_Stop_Fn)(int, _Unwind_Action, _Unwind_Exception_Class, _Unwind_Exception *, struct _Unwind_Context *, void *)
_Unwind_Reason_Code(* _Unwind_Trace_Fn)(struct _Unwind_Context *, void *)
_Unwind_Reason_Code _Unwind_SjLj_RaiseException(_Unwind_Exception *)
_Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *)
struct SjLj_Function_Context * _Unwind_FunctionContext_t
void * _Unwind_FindEnclosingFunction(void *)
_Unwind_Word _Unwind_GetBSP(struct _Unwind_Context *)
void _Unwind_SjLj_Register(_Unwind_FunctionContext_t)
uintptr_t _Unwind_Word __attribute__((__mode__(__unwind_word__)))
_Unwind_Reason_Code _Unwind_Resume_or_Rethrow(_Unwind_Exception *)
void(* _Unwind_Exception_Cleanup_Fn)(_Unwind_Reason_Code, _Unwind_Exception *)
void _Unwind_SjLj_Resume(_Unwind_Exception *)
_Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception *)
_Unwind_Reason_Code(* _Unwind_Personality_Fn)(int, _Unwind_Action, _Unwind_Exception_Class, _Unwind_Exception *, struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *)
_Unwind_Exception_Class exception_class
_Unwind_Word _Unwind_GetIPInfo(struct _Unwind_Context *, int *)
void * _Unwind_GetLanguageSpecificData(struct _Unwind_Context *)
_Unwind_Personality_Fn __personality_routine
_Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int)
void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t)