about summary refs log tree commit diff
path: root/src/libstd/sys/unix/backtrace/printing/mod.rs
diff options
context:
space:
mode:
authorYamakaky <yamakaky@yamaworld.fr>2016-12-04 16:38:27 -0500
committerYamakaky <yamakaky@yamaworld.fr>2017-02-15 14:24:37 -0500
commitd50e4cc0640e54a64d0f7ccb05a77fd4a2fe0741 (patch)
tree2c403c3c5fb8e02b5d5bbe493eec5375c47fd137 /src/libstd/sys/unix/backtrace/printing/mod.rs
parente0044bd3896456afb346d06e91a97ac515930ccf (diff)
downloadrust-d50e4cc0640e54a64d0f7ccb05a77fd4a2fe0741.tar.gz
rust-d50e4cc0640e54a64d0f7ccb05a77fd4a2fe0741.zip
Improve backtrace formating while panicking.
- `RUST_BACKTRACE=full` prints all the informations (old behaviour)
- `RUST_BACKTRACE=(0|no)` disables the backtrace.
- `RUST_BACKTRACE=<everything else>` (including `1`) shows a simplified
  backtrace, without the function addresses and with cleaned filenames
  and symbols. Also removes some unneded frames at the beginning and the
  end.

Fixes #37783.

PR is #38165.
Diffstat (limited to 'src/libstd/sys/unix/backtrace/printing/mod.rs')
-rw-r--r--src/libstd/sys/unix/backtrace/printing/mod.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/backtrace/printing/mod.rs b/src/libstd/sys/unix/backtrace/printing/mod.rs
index 02e53854727..1ae82e01100 100644
--- a/src/libstd/sys/unix/backtrace/printing/mod.rs
+++ b/src/libstd/sys/unix/backtrace/printing/mod.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pub use self::imp::print;
+pub use self::imp::{foreach_symbol_fileline, resolve_symname};
 
 #[cfg(any(target_os = "macos", target_os = "ios",
           target_os = "emscripten"))]
@@ -17,5 +17,6 @@ mod imp;
 
 #[cfg(not(any(target_os = "macos", target_os = "ios",
               target_os = "emscripten")))]
-#[path = "gnu.rs"]
-mod imp;
+mod imp {
+    pub use sys_common::gnu::libbacktrace::{foreach_symbol_fileline, resolve_symname};
+}