File tree 2 files changed +4
-8
lines changed
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) {
111
111
Err ( ( ) ) => return , // oh well...
112
112
} ;
113
113
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.
122
114
let function_table_access = dbghelp. SymFunctionTableAccess64 ( ) ;
123
115
let get_module_base = dbghelp. SymGetModuleBase64 ( ) ;
124
116
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) {
91
91
// The base address of the module containing the function will be stored here
92
92
// when RtlLookupFunctionEntry returns successfully.
93
93
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.
94
98
let fn_entry = RtlLookupFunctionEntry ( ip, & mut base, ptr:: null_mut ( ) ) ;
95
99
if fn_entry. is_null ( ) {
96
100
// No function entry could be found - this may indicate a corrupt
You can’t perform that action at this time.
0 commit comments