Skip to content

Commit 5fb2986

Browse files
KodrAusJDuchniewicz
authored andcommitted
format symbols under shared frames
1 parent e4a6032 commit 5fb2986

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/std/src/sys_common/backtrace.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt::
7171

7272
let mut hit = false;
7373
let mut stop = false;
74+
let mut frame_fmt = bt_fmt.frame();
7475
backtrace_rs::resolve_frame_unsynchronized(frame, |symbol| {
7576
hit = true;
7677
if print_fmt == PrintFmt::Short {
@@ -87,15 +88,15 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt::
8788
}
8889

8990
if start {
90-
res = bt_fmt.frame().symbol(frame, symbol);
91+
res = frame_fmt.symbol(frame, symbol);
9192
}
9293
});
9394
if stop {
9495
return false;
9596
}
9697
if !hit {
9798
if start {
98-
res = bt_fmt.frame().print_raw(frame.ip(), None, None, None);
99+
res = frame_fmt.print_raw(frame.ip(), None, None, None);
99100
}
100101
}
101102

0 commit comments

Comments
 (0)