@@ -114,11 +114,12 @@ } _Unwind_Reason_Code; struct objc_exception { struct _Unwind_Exception { uint64_t class; - void (*cleanup)(_Unwind_Reason_Code, struct _Unwind_Exception*); + void (*cleanup)( + _Unwind_Reason_Code, struct _Unwind_Exception *); #ifndef HAVE_ARM_EHABI_EXCEPTIONS # ifndef HAVE_SEH_EXCEPTIONS /* * The Itanium Exception ABI says to have those and never touch * them. @@ -163,28 +164,30 @@ uintptr_t typestable_base; uint8_t callsites_enc; const uint8_t *callsites, *actiontable; }; -extern _Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception*); -extern void _Unwind_DeleteException(struct _Unwind_Exception*); -extern void* _Unwind_GetLanguageSpecificData(struct _Unwind_Context*); -extern uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context*); -extern uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context*); -extern uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context*); +extern _Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *); +extern void _Unwind_DeleteException(struct _Unwind_Exception *); +extern void *_Unwind_GetLanguageSpecificData(struct _Unwind_Context *); +extern uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *); +extern uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context *); +extern uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context *); #ifndef HAVE_ARM_EHABI_EXCEPTIONS # define CONTINUE_UNWIND return _URC_CONTINUE_UNWIND -extern uintptr_t _Unwind_GetIP(struct _Unwind_Context*); -extern void _Unwind_SetIP(struct _Unwind_Context*, uintptr_t); -extern void _Unwind_SetGR(struct _Unwind_Context*, int, uintptr_t); +extern uintptr_t _Unwind_GetIP(struct _Unwind_Context *); +extern void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t); +extern void _Unwind_SetGR(struct _Unwind_Context *, int, uintptr_t); #else -extern _Unwind_Reason_Code __gnu_unwind_frame(struct _Unwind_Exception*, - struct _Unwind_Context*); -extern int _Unwind_VRS_Get(struct _Unwind_Context*, int, uint32_t, int, void*); -extern int _Unwind_VRS_Set(struct _Unwind_Context*, int, uint32_t, int, void*); +extern _Unwind_Reason_Code __gnu_unwind_frame(struct _Unwind_Exception *, + struct _Unwind_Context *); +extern int _Unwind_VRS_Get(struct _Unwind_Context *, int, uint32_t, int, + void *); +extern int _Unwind_VRS_Set(struct _Unwind_Context *, int, uint32_t, int, + void *); # define CONTINUE_UNWIND \ { \ if (__gnu_unwind_frame(ex, ctx) != _URC_OK) \ return _URC_FAILURE; \ @@ -223,13 +226,13 @@ #ifdef CXX_PERSONALITY static PERSONALITY_FUNC(cxx_personality) OF_WEAK_REF(CXX_PERSONALITY_STR); #endif #ifdef HAVE_SEH_EXCEPTIONS -extern EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void*, - PCONTEXT, PDISPATCHER_CONTEXT, _Unwind_Reason_Code(*)(int, int, uint64_t, - struct _Unwind_Exception*, struct _Unwind_Context*)); +extern EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, + PCONTEXT, PDISPATCHER_CONTEXT, _Unwind_Reason_Code (*)(int, int, uint64_t, + struct _Unwind_Exception *, struct _Unwind_Context *)); #endif static objc_uncaught_exception_handler uncaught_exception_handler; static struct objc_exception emergency_exceptions[NUM_EMERGENCY_EXCEPTIONS]; #ifdef OF_HAVE_THREADS @@ -301,11 +304,11 @@ if (enc == DW_EH_PE_omit) return 0; switch (enc & 0x07) { case DW_EH_PE_absptr: - return sizeof(void*); + return sizeof(void *); case DW_EH_PE_udata2: return 2; case DW_EH_PE_udata4: return 4; case DW_EH_PE_udata8: @@ -323,11 +326,11 @@ if (enc == DW_EH_PE_aligned) OBJC_ERROR("DW_EH_PE_aligned is not implemented!") #define READ(type) \ { \ - value = *(type*)(void*)*ptr; \ + value = *(type *)(void *)*ptr; \ *ptr += size_for_encoding(enc); \ break; \ } switch (enc & 0x0F) { case DW_EH_PE_absptr: @@ -366,11 +369,11 @@ return 0; value += ((enc & 0x70) == DW_EH_PE_pcrel ? (uintptr_t)start : base); if (enc & DW_EH_PE_indirect) - value = *(uintptr_t*)(uintptr_t)value; + value = *(uintptr_t *)(uintptr_t)value; return value; } #endif @@ -513,21 +516,21 @@ c = (uintptr_t)read_value(lsda->typestable_enc, &tmp); c = (uintptr_t)resolve_value(c, lsda->typestable_enc, lsda->typestable - i, lsda->typestable_base); #else tmp = lsda->typestable - (filter * 4); - c = *(uintptr_t*)(void*)tmp; + c = *(uintptr_t *)(void *)tmp; if (c != 0) { c += (uintptr_t)tmp; # if defined(OF_LINUX) || defined(OF_NETBSD) - c = *(uintptr_t*)c; + c = *(uintptr_t *)c; # endif } #endif - className = (const char*)c; + className = (const char *)c; if (className != NULL && *className != '\0' && strcmp(className, "@id") != 0) class = objc_getRequiredClass(className); else @@ -571,11 +574,11 @@ return _URC_FAILURE; } _Unwind_SetGR(ctx, 12, (uintptr_t)ex); #endif - struct objc_exception *e = (struct objc_exception*)ex; + struct objc_exception *e = (struct objc_exception *)ex; bool foreign = (ex_class != GNUCOBJC_EXCEPTION_CLASS); const uint8_t *lsda_addr, *actionrecords; struct lsda lsda; uintptr_t landingpad = 0; uint8_t found = 0; @@ -748,11 +751,11 @@ return old; } #ifdef HAVE_SEH_EXCEPTIONS -typedef EXCEPTION_DISPOSITION (*seh_personality_fn)(PEXCEPTION_RECORD, void*, +typedef EXCEPTION_DISPOSITION (*seh_personality_fn)(PEXCEPTION_RECORD, void *, PCONTEXT, PDISPATCHER_CONTEXT); static seh_personality_fn __gxx_personality_seh0; OF_CONSTRUCTOR() { @@ -773,11 +776,11 @@ EXCEPTION_DISPOSITION __gnu_objc_personality_seh0(PEXCEPTION_RECORD ms_exc, void *this_frame, PCONTEXT ms_orig_context, PDISPATCHER_CONTEXT ms_disp) { struct _Unwind_Exception *ex = - (struct _Unwind_Exception*)ms_exc->ExceptionInformation[0]; + (struct _Unwind_Exception *)ms_exc->ExceptionInformation[0]; switch (ex->class) { case GNUCCXX0_EXCEPTION_CLASS: case CLNGCXX0_EXCEPTION_CLASS: if (__gxx_personality_seh0 != NULL)