@@ -180,22 +180,29 @@ impl Unwinder {
180
180
self . unwinding = true ;
181
181
self . cause = Some ( cause) ;
182
182
183
- unsafe {
184
- let exception = ~uw:: _Unwind_Exception {
185
- exception_class : rust_exception_class ( ) ,
186
- exception_cleanup : exception_cleanup,
187
- private_1 : 0 ,
188
- private_2 : 0
189
- } ;
190
- let error = uw:: _Unwind_RaiseException ( cast:: transmute ( exception) ) ;
191
- rtabort ! ( "Could not unwind stack, error = {}" , error as int)
192
- }
183
+ rust_fail ( ) ;
193
184
194
- extern "C" fn exception_cleanup ( _unwind_code : uw:: _Unwind_Reason_Code ,
195
- exception : * uw:: _Unwind_Exception ) {
196
- rtdebug ! ( "exception_cleanup()" ) ;
185
+ // An uninlined, unmangled function upon which to slap yer breakpoints
186
+ #[ inline( never) ]
187
+ #[ no_mangle]
188
+ fn rust_fail ( ) -> ! {
197
189
unsafe {
198
- let _: ~uw:: _Unwind_Exception = cast:: transmute ( exception) ;
190
+ let exception = ~uw:: _Unwind_Exception {
191
+ exception_class : rust_exception_class ( ) ,
192
+ exception_cleanup : exception_cleanup,
193
+ private_1 : 0 ,
194
+ private_2 : 0
195
+ } ;
196
+ let error = uw:: _Unwind_RaiseException ( cast:: transmute ( exception) ) ;
197
+ rtabort ! ( "Could not unwind stack, error = {}" , error as int)
198
+ }
199
+
200
+ extern "C" fn exception_cleanup ( _unwind_code : uw:: _Unwind_Reason_Code ,
201
+ exception : * uw:: _Unwind_Exception ) {
202
+ rtdebug ! ( "exception_cleanup()" ) ;
203
+ unsafe {
204
+ let _: ~uw:: _Unwind_Exception = cast:: transmute ( exception) ;
205
+ }
199
206
}
200
207
}
201
208
}
0 commit comments