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;
119 struct _Unwind_Context *,
124 struct _Unwind_Context *);
130 #if defined(__arm__) && !defined(__APPLE__)
137 } _Unwind_VRS_RegClass;
145 } _Unwind_VRS_DataRepresentation;
149 _UVRSR_NOT_IMPLEMENTED = 1,
151 } _Unwind_VRS_Result;
153 _Unwind_VRS_Result _Unwind_VRS_Get(
struct _Unwind_Context *__context,
154 _Unwind_VRS_RegClass __regclass,
156 _Unwind_VRS_DataRepresentation __representation,
159 _Unwind_VRS_Result _Unwind_VRS_Set(
struct _Unwind_Context *__context,
160 _Unwind_VRS_RegClass __regclass,
162 _Unwind_VRS_DataRepresentation __representation,
166 _Unwind_Word
_Unwind_GetGR(
struct _Unwind_Context *__context,
int __index) {
167 _Unwind_Word __value;
168 _Unwind_VRS_Get(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
173 void _Unwind_SetGR(
struct _Unwind_Context *__context,
int __index,
174 _Unwind_Word __value) {
175 _Unwind_VRS_Set(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
179 _Unwind_Word
_Unwind_GetIP(
struct _Unwind_Context *__context) {
185 void _Unwind_SetIP(
struct _Unwind_Context *__context, _Unwind_Word __value) {
186 _Unwind_Word __thumb_mode_bit =
_Unwind_GetGR(__context, 15) & 0x1;
191 void _Unwind_SetGR(
struct _Unwind_Context *,
int, _Unwind_Word);
209 #if !defined(__APPLE__) || !defined(__arm__)
243 void __register_frame(const
void *);
244 void __deregister_frame(const
void *);
246 struct dwarf_eh_bases {
251 void *_Unwind_Find_FDE(
const void *,
struct dwarf_eh_bases *);
253 void __register_frame_info_bases(
const void *,
void *,
void *,
void *)
255 void __register_frame_info(const
void *,
void *)
__attribute__((__unavailable__));
256 void __register_frame_info_table_bases(const
void *,
void*,
void *,
void *)
258 void __register_frame_info_table(const
void *,
void *)
260 void __register_frame_table(const
void *)
__attribute__((__unavailable__));
261 void __deregister_frame_info(const
void *)
__attribute__((__unavailable__));
262 void __deregister_frame_info_bases(const
void *)
__attribute__((__unavailable__));
273 #pragma GCC visibility pop
_Unwind_Personality_Fn __personality_routine
Definition: unwind.h:125
_Unwind_Exception_Class exception_class
Definition: unwind.h:107
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
Definition: unwind.h:108
void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Word)
uintptr_t _uleb128_t
Definition: unwind.h:76
_Unwind_Word _Unwind_GetIP(struct _Unwind_Context *)
_Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *)
void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t)
intptr_t _Unwind_Sword
Definition: unwind.h:70
void * _Unwind_FindEnclosingFunction(void *)
_Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int)
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 *)
Definition: unwind.h:122
_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_Action
Definition: unwind.h:94
_Unwind_Reason_Code _Unwind_ForcedUnwind(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *)
uintptr_t _Unwind_Internal_Ptr
Definition: unwind.h:72
intptr_t _sleb128_t
Definition: unwind.h:75
struct _Unwind_Exception __attribute__((__aligned__))
uint64_t _Unwind_Exception_Class
Definition: unwind.h:73
_Unwind_Reason_Code(* _Unwind_Trace_Fn)(struct _Unwind_Context *, void *)
Definition: unwind.h:127
void _Unwind_SjLj_Resume(struct _Unwind_Exception *)
_Unwind_Word private_2
Definition: unwind.h:110
void _Unwind_DeleteException(struct _Unwind_Exception *)
_Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *)
uintptr_t _Unwind_Word
Definition: unwind.h:69
_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 *)
Definition: unwind.h:116
void(* _Unwind_Exception_Cleanup_Fn)(_Unwind_Reason_Code, struct _Unwind_Exception *)
Definition: unwind.h:103
struct SjLj_Function_Context * _Unwind_FunctionContext_t
Definition: unwind.h:223
_Unwind_Reason_Code
Definition: unwind.h:80
void * _Unwind_GetLanguageSpecificData(struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(struct _Unwind_Exception *)
uintptr_t _Unwind_Ptr
Definition: unwind.h:71
_Unwind_Word private_1
Definition: unwind.h:109
_Unwind_Word _Unwind_GetCFA(struct _Unwind_Context *)
_Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *)