diff options
| author | Ashley Mannix <kodraus@hey.com> | 2020-12-04 15:43:42 +1000 |
|---|---|---|
| committer | Jakub Duchniewicz <j.duchniewicz@gmail.com> | 2021-06-07 21:18:54 +0200 |
| commit | 5fb298664c5e8f179803ecf1502a7d4f51ba7ed4 (patch) | |
| tree | 909b3d9f60e33de1d97fc570e64bb4e78aebf755 | |
| parent | e4a60327063e82413eed50a10df3b7d19b77bda0 (diff) | |
| download | rust-5fb298664c5e8f179803ecf1502a7d4f51ba7ed4.tar.gz rust-5fb298664c5e8f179803ecf1502a7d4f51ba7ed4.zip | |
format symbols under shared frames
| -rw-r--r-- | library/std/src/sys_common/backtrace.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library/std/src/sys_common/backtrace.rs b/library/std/src/sys_common/backtrace.rs index a549770d8b3..5f6318ba5d2 100644 --- a/library/std/src/sys_common/backtrace.rs +++ b/library/std/src/sys_common/backtrace.rs @@ -71,6 +71,7 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt:: let mut hit = false; let mut stop = false; + let mut frame_fmt = bt_fmt.frame(); backtrace_rs::resolve_frame_unsynchronized(frame, |symbol| { hit = true; if print_fmt == PrintFmt::Short { @@ -87,7 +88,7 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt:: } if start { - res = bt_fmt.frame().symbol(frame, symbol); + res = frame_fmt.symbol(frame, symbol); } }); if stop { @@ -95,7 +96,7 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt:: } if !hit { if start { - res = bt_fmt.frame().print_raw(frame.ip(), None, None, None); + res = frame_fmt.print_raw(frame.ip(), None, None, None); } } |
