Skip to content

Instantly share code, notes, and snippets.

@niconii
Created May 20, 2015 20:39
Show Gist options
  • Save niconii/e9d04c084f725c877598 to your computer and use it in GitHub Desktop.
Save niconii/e9d04c084f725c877598 to your computer and use it in GitHub Desktop.
use std::env;
fn main() {
env::set_var("RUST_BACKTRACE", "1");
panic!();
}
nicole@november ~> rustc backtrace.rs
nicole@november ~> ./backtrace
thread '<main>' panicked at 'explicit panic', backtrace.rs:5
stack backtrace:
1: 0x7ff039aef2d9 - sys::backtrace::write::hbc46dc0cfb3b9537d4r
2: 0x7ff039af2498 - panicking::on_panic::h74d3c14d86c58ac8jrw
3: 0x7ff039aed362 - rt::unwind::begin_unwind_inner::h382cea404b11eb00t6v
4: 0x7ff039aebbd5 - rt::unwind::begin_unwind::h3193779739960736516
5: 0x7ff039aeb268 - main::hf128db7f67bb32c5faa
6: 0x7ff039af5ce8 - rust_try_inner
7: 0x7ff039af5cd5 - rust_try
8: 0x7ff039af3b3b - rt::lang_start::h176d3d20dd714195Olw
9: 0x7ff039aebf4e - main
10: 0x7ff038d007ff - __libc_start_main
11: 0x7ff039aeb0c8 - _start
12: 0x0 - <unknown>
nicole@november ~ [101]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment