File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-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) {
112
112
let function_table_access = dbghelp. SymFunctionTableAccess64 ( ) ;
113
113
let get_module_base = dbghelp. SymGetModuleBase64 ( ) ;
114
114
115
- let process_handle = GetCurrentProcess ( ) ;
116
-
117
115
// Attempt to use `StackWalkEx` if we can, but fall back to `StackWalk64`
118
116
// since it's in theory supported on more systems.
119
117
match ( * dbghelp. dbghelp ( ) ) . StackWalkEx ( ) {
@@ -146,7 +144,8 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
146
144
0 ,
147
145
) == TRUE
148
146
{
149
- frame. inner . base_address = get_module_base ( process_handle, frame. ip ( ) as _ ) as _ ;
147
+ frame. inner . base_address =
148
+ unsafe { get_module_base ( process, frame. ip ( ) as _ ) as _ } ;
150
149
151
150
if !cb ( & frame) {
152
151
break ;
@@ -178,7 +177,8 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
178
177
None ,
179
178
) == TRUE
180
179
{
181
- frame. inner . base_address = get_module_base ( process_handle, frame. ip ( ) as _ ) as _ ;
180
+ frame. inner . base_address =
181
+ unsafe { get_module_base ( process, frame. ip ( ) as _ ) as _ } ;
182
182
183
183
if !cb ( & frame) {
184
184
break ;
You can’t perform that action at this time.
0 commit comments