diff options
| author | Yamakaky <yamakaky@yamaworld.fr> | 2016-12-04 16:38:27 -0500 |
|---|---|---|
| committer | Yamakaky <yamakaky@yamaworld.fr> | 2017-02-15 14:24:37 -0500 |
| commit | d50e4cc0640e54a64d0f7ccb05a77fd4a2fe0741 (patch) | |
| tree | 2c403c3c5fb8e02b5d5bbe493eec5375c47fd137 /src/libstd/sys/redox/backtrace.rs | |
| parent | e0044bd3896456afb346d06e91a97ac515930ccf (diff) | |
| download | rust-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/redox/backtrace.rs')
| -rw-r--r-- | src/libstd/sys/redox/backtrace.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libstd/sys/redox/backtrace.rs b/src/libstd/sys/redox/backtrace.rs index 6f53841502a..961148fb6b4 100644 --- a/src/libstd/sys/redox/backtrace.rs +++ b/src/libstd/sys/redox/backtrace.rs @@ -10,9 +10,14 @@ use libc; use io; -use sys_common::backtrace::output; +use sys_common::backtrace::Frame; + +pub use sys_common::gnu::libbacktrace::*; +pub struct BacktraceContext; #[inline(never)] -pub fn write(w: &mut io::Write) -> io::Result<()> { - output(w, 0, 0 as *mut libc::c_void, None) +pub fn unwind_backtrace(frames: &mut [Frame]) + -> io::Result<(usize, BacktraceContext)> +{ + Ok((0, BacktraceContext)) } |
