#include "int_lib.h"
#include <stddef.h>
#include <unwind.h>
#if defined(__arm__) && !defined(__ARM_DWARF_EH__) && \
!defined(__USING_SJLJ_EXCEPTIONS__)
#include "unwind-ehabi-helpers.h"
#endif
#if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__)
#include <windows.h>
#include <winnt.h>
EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT,
PDISPATCHER_CONTEXT,
_Unwind_Personality_Fn);
#endif
#define DW_EH_PE_omit …
#define DW_EH_PE_absptr …
#define DW_EH_PE_uleb128 …
#define DW_EH_PE_udata2 …
#define DW_EH_PE_udata4 …
#define DW_EH_PE_udata8 …
#define DW_EH_PE_sleb128 …
#define DW_EH_PE_sdata2 …
#define DW_EH_PE_sdata4 …
#define DW_EH_PE_sdata8 …
#define DW_EH_PE_pcrel …
#define DW_EH_PE_textrel …
#define DW_EH_PE_datarel …
#define DW_EH_PE_funcrel …
#define DW_EH_PE_aligned …
#define DW_EH_PE_indirect …
static size_t readULEB128(const uint8_t **data) { … }
static uintptr_t readEncodedPointer(const uint8_t **data, uint8_t encoding) { … }
#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
!defined(__ARM_DWARF_EH__) && !defined(__SEH__)
#define USING_ARM_EHABI …
_Unwind_Reason_Code __gnu_unwind_frame(struct _Unwind_Exception *,
struct _Unwind_Context *);
#endif
static inline _Unwind_Reason_Code
continueUnwind(struct _Unwind_Exception *exceptionObject,
struct _Unwind_Context *context) { … }
#if __USING_SJLJ_EXCEPTIONS__
COMPILER_RT_ABI _Unwind_Reason_Code __gcc_personality_sj0(
int version, _Unwind_Action actions, uint64_t exceptionClass,
struct _Unwind_Exception *exceptionObject, struct _Unwind_Context *context)
#elif USING_ARM_EHABI
COMPILER_RT_ABI _Unwind_Reason_Code __gcc_personality_v0(
_Unwind_State state, struct _Unwind_Exception *exceptionObject,
struct _Unwind_Context *context)
#elif defined(__SEH__)
static _Unwind_Reason_Code __gcc_personality_imp(
int version, _Unwind_Action actions, uint64_t exceptionClass,
struct _Unwind_Exception *exceptionObject, struct _Unwind_Context *context)
#else
COMPILER_RT_ABI _Unwind_Reason_Code __gcc_personality_v0(
int version, _Unwind_Action actions, uint64_t exceptionClass,
struct _Unwind_Exception *exceptionObject, struct _Unwind_Context *context)
#endif
{ … }
#if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__)
COMPILER_RT_ABI EXCEPTION_DISPOSITION
__gcc_personality_seh0(PEXCEPTION_RECORD ms_exc, void *this_frame,
PCONTEXT ms_orig_context, PDISPATCHER_CONTEXT ms_disp) {
return _GCC_specific_handler(ms_exc, this_frame, ms_orig_context, ms_disp,
__gcc_personality_imp);
}
#endif