File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,6 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
112112 let function_table_access = dbghelp. SymFunctionTableAccess64 ( ) ;
113113 let get_module_base = dbghelp. SymGetModuleBase64 ( ) ;
114114
115- let process_handle = unsafe { GetCurrentProcess ( ) } ;
116-
117115 // Attempt to use `StackWalkEx` if we can, but fall back to `StackWalk64`
118116 // since it's in theory supported on more systems.
119117 match unsafe { ( * dbghelp. dbghelp ( ) ) . StackWalkEx ( ) } {
@@ -147,7 +145,7 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
147145 0 ,
148146 ) == TRUE }
149147 {
150- frame. inner . base_address = unsafe { get_module_base ( process_handle , frame. ip ( ) as _ ) as _ } ;
148+ frame. inner . base_address = unsafe { get_module_base ( process , frame. ip ( ) as _ ) as _ } ;
151149
152150 if !cb ( & frame) {
153151 break ;
@@ -180,7 +178,7 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
180178 None ,
181179 ) == TRUE }
182180 {
183- frame. inner . base_address = unsafe { get_module_base ( process_handle , frame. ip ( ) as _ ) as _ } ;
181+ frame. inner . base_address = unsafe { get_module_base ( process , frame. ip ( ) as _ ) as _ } ;
184182
185183 if !cb ( & frame) {
186184 break ;
You can’t perform that action at this time.
0 commit comments