@@ -76,13 +76,7 @@ typedef intptr_t _sleb128_t;
7676typedef uintptr_t _uleb128_t ;
7777
7878struct _Unwind_Context ;
79- #if defined(__arm__ ) && !(defined(__USING_SJLJ_EXCEPTIONS__ ) || defined(__ARM_DWARF_EH___ ))
80- struct _Unwind_Control_Block ;
81- typedef struct _Unwind_Control_Block _Unwind_Exception ; /* Alias */
82- #else
8379struct _Unwind_Exception ;
84- typedef struct _Unwind_Exception _Unwind_Exception ;
85- #endif
8680typedef enum {
8781 _URC_NO_REASON = 0 ,
8882#if defined(__arm__ ) && !defined(__USING_SJLJ_EXCEPTIONS__ ) && \
@@ -115,42 +109,8 @@ typedef enum {
115109} _Unwind_Action ;
116110
117111typedef void (* _Unwind_Exception_Cleanup_Fn )(_Unwind_Reason_Code ,
118- _Unwind_Exception * );
119-
120- #if defined(__arm__ ) && !(defined(__USING_SJLJ_EXCEPTIONS__ ) || defined(__ARM_DWARF_EH___ ))
121- typedef struct _Unwind_Control_Block _Unwind_Control_Block ;
122- typedef uint32_t _Unwind_EHT_Header ;
123-
124- struct _Unwind_Control_Block {
125- uint64_t exception_class ;
126- void (* exception_cleanup )(_Unwind_Reason_Code , _Unwind_Control_Block * );
127- /* unwinder cache (private fields for the unwinder's use) */
128- struct {
129- uint32_t reserved1 ; /* forced unwind stop function, 0 if not forced */
130- uint32_t reserved2 ; /* personality routine */
131- uint32_t reserved3 ; /* callsite */
132- uint32_t reserved4 ; /* forced unwind stop argument */
133- uint32_t reserved5 ;
134- } unwinder_cache ;
135- /* propagation barrier cache (valid after phase 1) */
136- struct {
137- uint32_t sp ;
138- uint32_t bitpattern [5 ];
139- } barrier_cache ;
140- /* cleanup cache (preserved over cleanup) */
141- struct {
142- uint32_t bitpattern [4 ];
143- } cleanup_cache ;
144- /* personality cache (for personality's benefit) */
145- struct {
146- uint32_t fnstart ; /* function start address */
147- _Unwind_EHT_Header * ehtp ; /* pointer to EHT entry header word */
148- uint32_t additional ; /* additional data */
149- uint32_t reserved1 ;
150- } pr_cache ;
151- long long int : 0 ; /* force alignment of next item to 8-byte boundary */
152- };
153- #else
112+ struct _Unwind_Exception * );
113+
154114struct _Unwind_Exception {
155115 _Unwind_Exception_Class exception_class ;
156116 _Unwind_Exception_Cleanup_Fn exception_cleanup ;
@@ -160,24 +120,23 @@ struct _Unwind_Exception {
160120 * aligned". GCC has interpreted this to mean "use the maximum useful
161121 * alignment for the target"; so do we. */
162122} __attribute__((__aligned__ ));
163- #endif
164123
165124typedef _Unwind_Reason_Code (* _Unwind_Stop_Fn )(int , _Unwind_Action ,
166125 _Unwind_Exception_Class ,
167- _Unwind_Exception * ,
126+ struct _Unwind_Exception * ,
168127 struct _Unwind_Context * ,
169128 void * );
170129
171- typedef _Unwind_Reason_Code (* _Unwind_Personality_Fn )(int , _Unwind_Action ,
172- _Unwind_Exception_Class ,
173- _Unwind_Exception * ,
174- struct _Unwind_Context * );
130+ typedef _Unwind_Reason_Code (* _Unwind_Personality_Fn )(
131+ int , _Unwind_Action , _Unwind_Exception_Class , struct _Unwind_Exception * ,
132+ struct _Unwind_Context * );
175133typedef _Unwind_Personality_Fn __personality_routine ;
176134
177135typedef _Unwind_Reason_Code (* _Unwind_Trace_Fn )(struct _Unwind_Context * ,
178136 void * );
179137
180- #if defined(__arm__ ) && !(defined(__USING_SJLJ_EXCEPTIONS__ ) || defined(__ARM_DWARF_EH___ ))
138+ #if defined(__arm__ ) && !defined(__APPLE__ )
139+
181140typedef enum {
182141 _UVRSC_CORE = 0 , /* integer register */
183142 _UVRSC_VFP = 1 , /* vfp */
@@ -199,12 +158,14 @@ typedef enum {
199158 _UVRSR_FAILED = 2
200159} _Unwind_VRS_Result ;
201160
161+ #if !defined(__USING_SJLJ_EXCEPTIONS__ ) && !defined(__ARM_DWARF_EH__ )
202162typedef uint32_t _Unwind_State ;
203163#define _US_VIRTUAL_UNWIND_FRAME ((_Unwind_State)0)
204164#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
205165#define _US_UNWIND_FRAME_RESUME ((_Unwind_State)2)
206166#define _US_ACTION_MASK ((_Unwind_State)3)
207167#define _US_FORCE_UNWIND ((_Unwind_State)8)
168+ #endif
208169
209170_Unwind_VRS_Result _Unwind_VRS_Get (struct _Unwind_Context * __context ,
210171 _Unwind_VRS_RegClass __regclass ,
@@ -263,12 +224,13 @@ _Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *);
263224
264225/* DWARF EH functions; currently not available on Darwin/ARM */
265226#if !defined(__APPLE__ ) || !defined(__arm__ )
266- _Unwind_Reason_Code _Unwind_RaiseException (_Unwind_Exception * );
267- _Unwind_Reason_Code _Unwind_ForcedUnwind (_Unwind_Exception * , _Unwind_Stop_Fn ,
268- void * );
269- void _Unwind_DeleteException (_Unwind_Exception * );
270- void _Unwind_Resume (_Unwind_Exception * );
271- _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (_Unwind_Exception * );
227+
228+ _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception * );
229+ _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception * ,
230+ _Unwind_Stop_Fn , void * );
231+ void _Unwind_DeleteException (struct _Unwind_Exception * );
232+ void _Unwind_Resume (struct _Unwind_Exception * );
233+ _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (struct _Unwind_Exception * );
272234
273235#endif
274236
@@ -279,11 +241,11 @@ typedef struct SjLj_Function_Context *_Unwind_FunctionContext_t;
279241
280242void _Unwind_SjLj_Register (_Unwind_FunctionContext_t );
281243void _Unwind_SjLj_Unregister (_Unwind_FunctionContext_t );
282- _Unwind_Reason_Code _Unwind_SjLj_RaiseException (_Unwind_Exception * );
283- _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind (_Unwind_Exception * ,
244+ _Unwind_Reason_Code _Unwind_SjLj_RaiseException (struct _Unwind_Exception * );
245+ _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind (struct _Unwind_Exception * ,
284246 _Unwind_Stop_Fn , void * );
285- void _Unwind_SjLj_Resume (_Unwind_Exception * );
286- _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow (_Unwind_Exception * );
247+ void _Unwind_SjLj_Resume (struct _Unwind_Exception * );
248+ _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow (struct _Unwind_Exception * );
287249
288250void * _Unwind_FindEnclosingFunction (void * );
289251
0 commit comments