File tree 1 file changed +11
-12
lines changed 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,6 @@ pub unsafe fn resolve(what: ResolveWhat, cb: &mut FnMut(&super::Symbol)) {
233
233
// Finally, get a cached mapping or create a new mapping for this file, and
234
234
// evaluate the DWARF info to find the file/line/name for this address.
235
235
with_mapping_for_path ( path, |dwarf, symbols| {
236
- let mut found_sym = false ;
237
236
if let Ok ( mut frames) = dwarf. find_frames ( addr. 0 as u64 ) {
238
237
while let Ok ( Some ( frame) ) = frames. next ( ) {
239
238
let name = frame. function . as_ref ( ) . and_then ( |f| f. raw_name ( ) . ok ( ) ) ;
@@ -245,21 +244,21 @@ pub unsafe fn resolve(what: ResolveWhat, cb: &mut FnMut(&super::Symbol)) {
245
244
name,
246
245
} ,
247
246
} ) ;
248
- found_sym = true ;
249
247
}
250
248
}
249
+ if cb. called {
250
+ return ;
251
+ }
251
252
252
253
// No DWARF info found, so fallback to the symbol table.
253
- if !found_sym {
254
- if let Some ( name) = symbols. get ( addr. 0 as u64 ) . and_then ( |x| x. name ( ) ) {
255
- let sym = super :: Symbol {
256
- inner : Symbol :: Symbol {
257
- addr : addr. 0 as usize as * mut c_void ,
258
- name : name. as_bytes ( ) ,
259
- } ,
260
- } ;
261
- cb. call ( & sym) ;
262
- }
254
+ if let Some ( name) = symbols. get ( addr. 0 as u64 ) . and_then ( |x| x. name ( ) ) {
255
+ let sym = super :: Symbol {
256
+ inner : Symbol :: Symbol {
257
+ addr : addr. 0 as usize as * mut c_void ,
258
+ name : name. as_bytes ( ) ,
259
+ } ,
260
+ } ;
261
+ cb. call ( & sym) ;
263
262
}
264
263
} ) ;
265
264
You can’t perform that action at this time.
0 commit comments