26 #ifndef __CLANG_UNWIND_H
27 #define __CLANG_UNWIND_H
29 #if defined(__APPLE__) && __has_include_next(<unwind.h>)
34 # define _SHOULD_UNDEFINE_GNU_SOURCE
44 # include_next <unwind.h>
46 # pragma GCC visibility push(default)
47 # include_next <unwind.h>
48 # pragma GCC visibility pop
50 # ifdef _SHOULD_UNDEFINE_GNU_SOURCE
52 # undef _SHOULD_UNDEFINE_GNU_SOURCE
66 #pragma GCC visibility push(default)
78 struct _Unwind_Context;
82 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
83 !defined(__ARM_DWARF_EH__)
96 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
97 !defined(__ARM_DWARF_EH__)
127 struct _Unwind_Context *,
132 struct _Unwind_Context *);
138 #if defined(__arm__) && !defined(__APPLE__)
145 } _Unwind_VRS_RegClass;
153 } _Unwind_VRS_DataRepresentation;
157 _UVRSR_NOT_IMPLEMENTED = 1,
159 } _Unwind_VRS_Result;
161 #if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__ARM_DWARF_EH__)
162 typedef uint32_t _Unwind_State;
163 #define _US_VIRTUAL_UNWIND_FRAME ((_Unwind_State)0)
164 #define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
165 #define _US_UNWIND_FRAME_RESUME ((_Unwind_State)2)
166 #define _US_ACTION_MASK ((_Unwind_State)3)
167 #define _US_FORCE_UNWIND ((_Unwind_State)8)
170 _Unwind_VRS_Result _Unwind_VRS_Get(
struct _Unwind_Context *__context,
171 _Unwind_VRS_RegClass __regclass,
173 _Unwind_VRS_DataRepresentation __representation,
176 _Unwind_VRS_Result _Unwind_VRS_Set(
struct _Unwind_Context *__context,
177 _Unwind_VRS_RegClass __regclass,
179 _Unwind_VRS_DataRepresentation __representation,
183 _Unwind_Word
_Unwind_GetGR(
struct _Unwind_Context *__context,
int __index) {
184 _Unwind_Word __value;
185 _Unwind_VRS_Get(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
190 void _Unwind_SetGR(
struct _Unwind_Context *__context,
int __index,
191 _Unwind_Word __value) {
192 _Unwind_VRS_Set(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
196 _Unwind_Word
_Unwind_GetIP(
struct _Unwind_Context *__context) {
202 void _Unwind_SetIP(
struct _Unwind_Context *__context, _Unwind_Word __value) {
203 _Unwind_Word __thumb_mode_bit =
_Unwind_GetGR(__context, 15) & 0x1;
208 void _Unwind_SetGR(
struct _Unwind_Context *,
int, _Unwind_Word);
226 #if !defined(__APPLE__) || !defined(__arm__)
260 void __register_frame(const
void *);
261 void __deregister_frame(const
void *);
263 struct dwarf_eh_bases {
268 void *_Unwind_Find_FDE(
const void *,
struct dwarf_eh_bases *);
270 void __register_frame_info_bases(
const void *,
void *,
void *,
void *)
272 void __register_frame_info(const
void *,
void *)
__attribute__((__unavailable__));
273 void __register_frame_info_table_bases(const
void *,
void*,
void *,
void *)
275 void __register_frame_info_table(const
void *,
void *)
277 void __register_frame_table(const
void *)
__attribute__((__unavailable__));
278 void __deregister_frame_info(const
void *)
__attribute__((__unavailable__));
279 void __deregister_frame_info_bases(const
void *)
__attribute__((__unavailable__));
290 #pragma GCC visibility pop
_Unwind_Personality_Fn __personality_routine
_Unwind_Exception_Class exception_class
void _Unwind_Resume(struct _Unwind_Exception *)
_Unwind_Reason_Code _Unwind_Resume_or_Rethrow(struct _Unwind_Exception *)
_Unwind_Word _Unwind_GetBSP(struct _Unwind_Context *)
_Unwind_Exception_Cleanup_Fn exception_cleanup
void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Word)
_Unwind_Word _Unwind_GetIP(struct _Unwind_Context *)
_Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *)
void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t)
void * _Unwind_FindEnclosingFunction(void *)
_Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int)
__INTPTR_TYPE__ intptr_t
A signed integer type with the property that any valid pointer to void can be converted to this type...
void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Word)
_Unwind_Reason_Code(* _Unwind_Personality_Fn)(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_SjLj_RaiseException(struct _Unwind_Exception *)
_Unwind_Word _Unwind_GetIPInfo(struct _Unwind_Context *, int *)
_Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *)
_Unwind_Reason_Code _Unwind_ForcedUnwind(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *)
uintptr_t _Unwind_Internal_Ptr
struct _Unwind_Exception __attribute__((__aligned__))
uint64_t _Unwind_Exception_Class
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
_Unwind_Reason_Code(* _Unwind_Trace_Fn)(struct _Unwind_Context *, void *)
void _Unwind_SjLj_Resume(struct _Unwind_Exception *)
void _Unwind_DeleteException(struct _Unwind_Exception *)
_Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *)
_Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *)
void _Unwind_SjLj_Register(_Unwind_FunctionContext_t)
_Unwind_Reason_Code(* _Unwind_Stop_Fn)(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *, void *)
void(* _Unwind_Exception_Cleanup_Fn)(_Unwind_Reason_Code, struct _Unwind_Exception *)
struct SjLj_Function_Context * _Unwind_FunctionContext_t
void * _Unwind_GetLanguageSpecificData(struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(struct _Unwind_Exception *)
_Unwind_Word _Unwind_GetCFA(struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *)