9
9
//! Note that all dbghelp support is loaded dynamically, see `src/dbghelp.rs`
10
10
//! for more information about that.
11
11
12
- #![ allow( bad_style) ]
13
-
14
12
use super :: super :: { dbghelp, windows_sys:: * } ;
15
13
use core:: ffi:: c_void;
16
14
use core:: mem;
@@ -111,14 +109,6 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
111
109
Err ( ( ) ) => return , // oh well...
112
110
} ;
113
111
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
112
let function_table_access = dbghelp. SymFunctionTableAccess64 ( ) ;
123
113
let get_module_base = dbghelp. SymGetModuleBase64 ( ) ;
124
114
@@ -127,6 +117,7 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
127
117
// Attempt to use `StackWalkEx` if we can, but fall back to `StackWalk64`
128
118
// since it's in theory supported on more systems.
129
119
match ( * dbghelp. dbghelp ( ) ) . StackWalkEx ( ) {
120
+ #[ allow( non_snake_case) ]
130
121
Some ( StackWalkEx ) => {
131
122
let mut inner: STACKFRAME_EX = mem:: zeroed ( ) ;
132
123
inner. StackFrameSize = mem:: size_of :: < STACKFRAME_EX > ( ) as u32 ;
0 commit comments