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__) || defined(__ARM_DWARF_EH__)) 66 struct _Unwind_Control_Block;
74 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \ 75 !defined(__ARM_DWARF_EH__) 88 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \ 89 !defined(__ARM_DWARF_EH__) 106 #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__)) 107 typedef struct _Unwind_Control_Block _Unwind_Control_Block;
108 typedef uint32_t _Unwind_EHT_Header;
110 struct _Unwind_Control_Block {
124 uint32_t bitpattern[5];
128 uint32_t bitpattern[4];
133 _Unwind_EHT_Header *ehtp;
143 #if !defined (__USING_SJLJ_EXCEPTIONS__) && defined (__SEH__) 144 _Unwind_Word private_[6];
158 struct _Unwind_Context *,
164 struct _Unwind_Context *);
170 #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__)) 176 } _Unwind_VRS_RegClass;
184 } _Unwind_VRS_DataRepresentation;
188 _UVRSR_NOT_IMPLEMENTED = 1,
190 } _Unwind_VRS_Result;
192 typedef uint32_t _Unwind_State;
193 #define _US_VIRTUAL_UNWIND_FRAME ((_Unwind_State)0) 194 #define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1) 195 #define _US_UNWIND_FRAME_RESUME ((_Unwind_State)2) 196 #define _US_ACTION_MASK ((_Unwind_State)3) 197 #define _US_FORCE_UNWIND ((_Unwind_State)8) 199 _Unwind_VRS_Result _Unwind_VRS_Get(
struct _Unwind_Context *__context,
200 _Unwind_VRS_RegClass __regclass,
202 _Unwind_VRS_DataRepresentation __representation,
205 _Unwind_VRS_Result _Unwind_VRS_Set(
struct _Unwind_Context *__context,
206 _Unwind_VRS_RegClass __regclass,
208 _Unwind_VRS_DataRepresentation __representation,
212 _Unwind_Word
_Unwind_GetGR(
struct _Unwind_Context *__context,
int __index) {
214 _Unwind_VRS_Get(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
219 void _Unwind_SetGR(
struct _Unwind_Context *__context,
int __index,
221 _Unwind_VRS_Set(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
225 _Unwind_Word
_Unwind_GetIP(
struct _Unwind_Context *__context) {
227 return __ip & ~(_Unwind_Word)(0x1);
231 void _Unwind_SetIP(
struct _Unwind_Context *__context, _Unwind_Word __value) {
232 _Unwind_Word __thumb_mode_bit =
_Unwind_GetGR(__context, 15) & 0x1;
237 void _Unwind_SetGR(
struct _Unwind_Context *,
int, _Unwind_Word);
255 #if !defined(__APPLE__) || !defined(__arm__) 288 void __register_frame(
const void *);
289 void __deregister_frame(
const void *);
291 struct dwarf_eh_bases {
296 void *_Unwind_Find_FDE(
const void *,
struct dwarf_eh_bases *);
298 void __register_frame_info_bases(
const void *,
void *,
void *,
void *)
300 void __register_frame_info(
const void *,
void *)
__attribute__((__unavailable__));
301 void __register_frame_info_table_bases(
const void *,
void*,
void *,
void *)
303 void __register_frame_info_table(
const void *,
void *)
305 void __register_frame_table(
const void *)
__attribute__((__unavailable__));
306 void __deregister_frame_info(
const void *)
__attribute__((__unavailable__));
307 void __deregister_frame_info_bases(
const void *)
__attribute__((__unavailable__));
318 #pragma GCC visibility pop void _Unwind_Resume(_Unwind_Exception *)
_Unwind_Personality_Fn __personality_routine
_Unwind_Exception_Class exception_class
uintptr_t _Unwind_Word __attribute__((__mode__(__unwind_word__)))
_Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception *)
_Unwind_Word _Unwind_GetBSP(struct _Unwind_Context *)
_Unwind_Reason_Code(* _Unwind_Trace_Fn)(struct _Unwind_Context *, void *)
_Unwind_Exception_Cleanup_Fn exception_cleanup
void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Word)
_Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn, void *)
_Unwind_Reason_Code _Unwind_Resume_or_Rethrow(_Unwind_Exception *)
_Unwind_Word _Unwind_GetIP(struct _Unwind_Context *)
_Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *)
void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t)
_Unwind_Exception_Cleanup_Fn exception_cleanup
void * _Unwind_FindEnclosingFunction(void *)
_Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int)
void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Word)
_Unwind_Word _Unwind_GetIPInfo(struct _Unwind_Context *, int *)
_Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *)
_Unwind_Reason_Code(* _Unwind_Stop_Fn)(int, _Unwind_Action, _Unwind_Exception_Class, _Unwind_Exception *, struct _Unwind_Context *, void *)
_Unwind_Reason_Code _Unwind_SjLj_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...
uintptr_t _Unwind_Internal_Ptr
void _Unwind_SjLj_Resume(_Unwind_Exception *)
uint64_t _Unwind_Exception_Class
_Unwind_Exception_Class exception_class
__INTPTR_TYPE__ intptr_t
A signed integer type with the property that any valid pointer to void can be converted to this type...
_Unwind_Reason_Code _Unwind_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn, void *)
_Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *)
void _Unwind_SjLj_Register(_Unwind_FunctionContext_t)
static __inline__ void unsigned int __value
struct SjLj_Function_Context * _Unwind_FunctionContext_t
void * _Unwind_GetLanguageSpecificData(struct _Unwind_Context *)
void(* _Unwind_Exception_Cleanup_Fn)(_Unwind_Reason_Code, _Unwind_Exception *)
_Unwind_Word _Unwind_GetCFA(struct _Unwind_Context *)
_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 *)
void _Unwind_DeleteException(_Unwind_Exception *)
_Unwind_Reason_Code _Unwind_SjLj_RaiseException(_Unwind_Exception *)