Go to the documentation of this file.
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)
64 struct _Unwind_Context;
65 #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || \
66 defined(__ARM_DWARF_EH__) || defined(__SEH__))
67 struct _Unwind_Control_Block;
75 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
76 !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
89 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
90 !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
107 #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || \
108 defined(__ARM_DWARF_EH__) || defined(__SEH__))
109 typedef struct _Unwind_Control_Block _Unwind_Control_Block;
110 typedef uint32_t _Unwind_EHT_Header;
112 struct _Unwind_Control_Block {
126 uint32_t bitpattern[5];
130 uint32_t bitpattern[4];
135 _Unwind_EHT_Header *ehtp;
145 #if !defined (__USING_SJLJ_EXCEPTIONS__) && defined (__SEH__)
146 _Unwind_Word private_[6];
160 struct _Unwind_Context *,
166 struct _Unwind_Context *);
172 #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || \
173 defined(__ARM_DWARF_EH__) || defined(__SEH__))
180 } _Unwind_VRS_RegClass;
188 } _Unwind_VRS_DataRepresentation;
192 _UVRSR_NOT_IMPLEMENTED = 1,
194 } _Unwind_VRS_Result;
196 typedef uint32_t _Unwind_State;
197 #define _US_VIRTUAL_UNWIND_FRAME ((_Unwind_State)0)
198 #define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
199 #define _US_UNWIND_FRAME_RESUME ((_Unwind_State)2)
200 #define _US_ACTION_MASK ((_Unwind_State)3)
201 #define _US_FORCE_UNWIND ((_Unwind_State)8)
203 _Unwind_VRS_Result _Unwind_VRS_Get(
struct _Unwind_Context *__context,
204 _Unwind_VRS_RegClass __regclass,
206 _Unwind_VRS_DataRepresentation __representation,
209 _Unwind_VRS_Result _Unwind_VRS_Set(
struct _Unwind_Context *__context,
210 _Unwind_VRS_RegClass __regclass,
212 _Unwind_VRS_DataRepresentation __representation,
216 _Unwind_Word
_Unwind_GetGR(
struct _Unwind_Context *__context,
int __index) {
218 _Unwind_VRS_Get(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &
__value);
223 void _Unwind_SetGR(
struct _Unwind_Context *__context,
int __index,
225 _Unwind_VRS_Set(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &
__value);
229 _Unwind_Word
_Unwind_GetIP(
struct _Unwind_Context *__context) {
231 return __ip & ~(_Unwind_Word)(0x1);
236 _Unwind_Word __thumb_mode_bit =
_Unwind_GetGR(__context, 15) & 0x1;
241 void _Unwind_SetGR(
struct _Unwind_Context *,
int, _Unwind_Word);
259 #if !defined(__APPLE__) || !defined(__arm__)
292 void __register_frame(
const void *);
293 void __deregister_frame(
const void *);
295 struct dwarf_eh_bases {
300 void *_Unwind_Find_FDE(
const void *,
struct dwarf_eh_bases *);
302 void __register_frame_info_bases(
const void *,
void *,
void *,
void *)
304 void __register_frame_info(
const void *,
void *)
__attribute__((__unavailable__));
305 void __register_frame_info_table_bases(
const void *,
void*,
void *,
void *)
307 void __register_frame_info_table(
const void *,
void *)
309 void __register_frame_table(
const void *)
__attribute__((__unavailable__));
310 void __deregister_frame_info(
const void *)
__attribute__((__unavailable__));
311 void __deregister_frame_info_bases(
const void *)
__attribute__((__unavailable__));
322 #pragma GCC visibility pop
_Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception *)
void(* _Unwind_Exception_Cleanup_Fn)(_Unwind_Reason_Code, _Unwind_Exception *)
uintptr_t _Unwind_Word __attribute__((__mode__(__unwind_word__)))
void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Word)
_Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *)
void * _Unwind_FindEnclosingFunction(void *)
_Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *)
_Unwind_Reason_Code(* _Unwind_Stop_Fn)(int, _Unwind_Action, _Unwind_Exception_Class, _Unwind_Exception *, struct _Unwind_Context *, void *)
uintptr_t _Unwind_Internal_Ptr
_Unwind_Exception_Cleanup_Fn exception_cleanup
_Unwind_Word _Unwind_GetCFA(struct _Unwind_Context *)
_Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *)
_Unwind_Reason_Code(* _Unwind_Trace_Fn)(struct _Unwind_Context *, void *)
@ _URC_FATAL_PHASE2_ERROR
__INTPTR_TYPE__ intptr_t
A signed integer type with the property that any valid pointer to void can be converted to this type,...
@ _URC_FOREIGN_EXCEPTION_CAUGHT
_Unwind_Exception_Class exception_class
_Unwind_Exception_Cleanup_Fn exception_cleanup
_Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int)
_Unwind_Reason_Code _Unwind_Resume_or_Rethrow(_Unwind_Exception *)
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Word)
_Unwind_Word _Unwind_GetIP(struct _Unwind_Context *)
uint64_t _Unwind_Exception_Class
@ _URC_FATAL_PHASE1_ERROR
_Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn, void *)
_Unwind_Word _Unwind_GetBSP(struct _Unwind_Context *)
void _Unwind_DeleteException(_Unwind_Exception *)
struct SjLj_Function_Context * _Unwind_FunctionContext_t
void _Unwind_SjLj_Register(_Unwind_FunctionContext_t)
_Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(_Unwind_Exception *)
_Unwind_Reason_Code _Unwind_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn, void *)
static __inline__ void unsigned int __value
_Unwind_Word _Unwind_GetIPInfo(struct _Unwind_Context *, int *)
void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t)
void * _Unwind_GetLanguageSpecificData(struct _Unwind_Context *)
_Unwind_Exception_Class exception_class
void _Unwind_Resume(_Unwind_Exception *)
_Unwind_Reason_Code _Unwind_SjLj_RaiseException(_Unwind_Exception *)
_Unwind_Reason_Code(* _Unwind_Personality_Fn)(int, _Unwind_Action, _Unwind_Exception_Class, _Unwind_Exception *, struct _Unwind_Context *)
_Unwind_Personality_Fn __personality_routine
void _Unwind_SjLj_Resume(_Unwind_Exception *)