@@ -5,7 +5,7 @@ use fallible_iterator::FallibleIterator;
55use gimli:: X86_64 ;
66
77use registers:: Registers ;
8- use super :: { DwarfUnwinder , Unwinder } ;
8+ use super :: { DwarfUnwinder , Unwinder , StackFrames } ;
99
1010#[ repr( C ) ]
1111#[ derive( Copy , Clone , PartialEq ) ]
@@ -58,7 +58,7 @@ type PersonalityRoutine = extern "C" fn(version: c_int, actions: c_int, class: u
5858// it never needs any cleanup. Currently this is not true.
5959#[ no_mangle]
6060pub unsafe extern "C" fn _Unwind_Resume ( exception : * mut _Unwind_Exception ) -> ! {
61- DwarfUnwinder :: default ( ) . trace ( |frames | unwind_tracer ( frames , exception) ) ;
61+ :: glue :: registers ( |registers | unwind_tracer ( registers , exception) ) ;
6262 unreachable ! ( ) ;
6363}
6464
@@ -120,11 +120,14 @@ pub unsafe extern "C" fn _Unwind_FindEnclosingFunction(pc: *mut c_void) -> *mut
120120#[ no_mangle]
121121pub unsafe extern "C" fn _Unwind_RaiseException ( exception : * mut _Unwind_Exception ) -> _Unwind_Reason_Code {
122122 ( * exception) . private_contptr = None ;
123- DwarfUnwinder :: default ( ) . trace ( |frames | unwind_tracer ( frames , exception) ) ;
123+ :: glue :: registers ( |registers | unwind_tracer ( registers , exception) ) ;
124124 unreachable ! ( ) ;
125125}
126126
127- unsafe fn unwind_tracer ( frames : & mut :: StackFrames , exception : * mut _Unwind_Exception ) {
127+ unsafe fn unwind_tracer ( registers : Registers , exception : * mut _Unwind_Exception ) {
128+ let mut unwinder = DwarfUnwinder :: default ( ) ;
129+ let mut frames = StackFrames :: new ( & mut unwinder, registers) ;
130+
128131 if let Some ( contptr) = ( * exception) . private_contptr {
129132 loop {
130133 if let Some ( frame) = frames. next ( ) . unwrap ( ) {
0 commit comments