File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -111,14 +111,6 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
111111 Err ( ( ) ) => return , // oh well...
112112 } ;
113113
114- // On x86_64 and ARM64 we opt to not use the default `Sym*` functions from
115- // dbghelp for getting the function table and module base. Instead we use
116- // the `RtlLookupFunctionEntry` function in kernel32 which will account for
117- // JIT compiler frames as well. These should be equivalent, but using
118- // `Rtl*` allows us to backtrace through JIT frames.
119- //
120- // Note that `RtlLookupFunctionEntry` only works for in-process backtraces,
121- // but that's all we support anyway, so it all lines up well.
122114 let function_table_access = dbghelp. SymFunctionTableAccess64 ( ) ;
123115 let get_module_base = dbghelp. SymGetModuleBase64 ( ) ;
124116
Original file line number Diff line number Diff line change @@ -91,6 +91,10 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
9191 // The base address of the module containing the function will be stored here
9292 // when RtlLookupFunctionEntry returns successfully.
9393 let mut base = 0 ;
94+ // We use the `RtlLookupFunctionEntry` function in kernel32 which allows
95+ // us to backtrace through JIT frames.
96+ // Note that `RtlLookupFunctionEntry` only works for in-process backtraces,
97+ // but that's all we support anyway, so it all lines up well.
9498 let fn_entry = RtlLookupFunctionEntry ( ip, & mut base, ptr:: null_mut ( ) ) ;
9599 if fn_entry. is_null ( ) {
96100 // No function entry could be found - this may indicate a corrupt
You can’t perform that action at this time.
0 commit comments