@@ -156,14 +156,16 @@ unsafe extern "C" fn rust_eh_personality(version: c_int,
156156 let eh_action = find_eh_action ( context) ;
157157 if actions as i32 & uw:: _UA_SEARCH_PHASE as i32 != 0 {
158158 match eh_action {
159- EHAction :: None | EHAction :: Cleanup ( _) => return uw:: _URC_CONTINUE_UNWIND,
159+ EHAction :: None |
160+ EHAction :: Cleanup ( _) => return uw:: _URC_CONTINUE_UNWIND,
160161 EHAction :: Catch ( _) => return uw:: _URC_HANDLER_FOUND,
161162 EHAction :: Terminate => return uw:: _URC_FATAL_PHASE1_ERROR,
162163 }
163164 } else {
164165 match eh_action {
165166 EHAction :: None => return uw:: _URC_CONTINUE_UNWIND,
166- EHAction :: Cleanup ( lpad) | EHAction :: Catch ( lpad) => {
167+ EHAction :: Cleanup ( lpad) |
168+ EHAction :: Catch ( lpad) => {
167169 uw:: _Unwind_SetGR ( context, UNWIND_DATA_REG . 0 , exception_object as uintptr_t ) ;
168170 uw:: _Unwind_SetGR ( context, UNWIND_DATA_REG . 1 , 0 ) ;
169171 uw:: _Unwind_SetIP ( context, lpad) ;
@@ -182,7 +184,7 @@ unsafe extern "C" fn rust_eh_personality(version: c_int,
182184unsafe extern "C" fn rust_eh_personality ( state : uw:: _Unwind_State ,
183185 exception_object : * mut uw:: _Unwind_Exception ,
184186 context : * mut uw:: _Unwind_Context )
185- -> uw:: _Unwind_Reason_Code {
187+ -> uw:: _Unwind_Reason_Code {
186188 let state = state as c_int ;
187189 let action = state & uw:: _US_ACTION_MASK as c_int ;
188190 let search_phase = if action == uw:: _US_VIRTUAL_UNWIND_FRAME as c_int {
@@ -191,7 +193,7 @@ unsafe extern "C" fn rust_eh_personality(state: uw::_Unwind_State,
191193 // we want to continue unwinding the stack, otherwise all our backtraces
192194 // would end at __rust_try
193195 if state & uw:: _US_FORCE_UNWIND as c_int != 0 {
194- return continue_unwind ( exception_object, context)
196+ return continue_unwind ( exception_object, context) ;
195197 }
196198 true
197199 } else if action == uw:: _US_UNWIND_FRAME_STARTING as c_int {
@@ -207,7 +209,9 @@ unsafe extern "C" fn rust_eh_personality(state: uw::_Unwind_State,
207209 // To preserve signatures of functions like _Unwind_GetLanguageSpecificData(), which
208210 // take only the context pointer, GCC personality routines stash a pointer to exception_object
209211 // in the context, using location reserved for ARM's "scratch register" (r12).
210- uw:: _Unwind_SetGR ( context, uw:: UNWIND_POINTER_REG , exception_object as uw:: _Unwind_Ptr ) ;
212+ uw:: _Unwind_SetGR ( context,
213+ uw:: UNWIND_POINTER_REG ,
214+ exception_object as uw:: _Unwind_Ptr ) ;
211215 // ...A more principled approach would be to provide the full definition of ARM's
212216 // _Unwind_Context in our libunwind bindings and fetch the required data from there directly,
213217 // bypassing DWARF compatibility functions.
@@ -223,7 +227,8 @@ unsafe extern "C" fn rust_eh_personality(state: uw::_Unwind_State,
223227 } else {
224228 match eh_action {
225229 EHAction :: None => return continue_unwind ( exception_object, context) ,
226- EHAction :: Cleanup ( lpad) | EHAction :: Catch ( lpad) => {
230+ EHAction :: Cleanup ( lpad) |
231+ EHAction :: Catch ( lpad) => {
227232 uw:: _Unwind_SetGR ( context, UNWIND_DATA_REG . 0 , exception_object as uintptr_t ) ;
228233 uw:: _Unwind_SetGR ( context, UNWIND_DATA_REG . 1 , 0 ) ;
229234 uw:: _Unwind_SetIP ( context, lpad) ;
@@ -247,8 +252,8 @@ unsafe extern "C" fn rust_eh_personality(state: uw::_Unwind_State,
247252 // defined in libgcc
248253 extern "C" {
249254 fn __gnu_unwind_frame ( exception_object : * mut uw:: _Unwind_Exception ,
250- context : * mut uw:: _Unwind_Context )
251- -> uw:: _Unwind_Reason_Code ;
255+ context : * mut uw:: _Unwind_Context )
256+ -> uw:: _Unwind_Reason_Code ;
252257 }
253258}
254259
0 commit comments