Skip to content

Instantly share code, notes, and snippets.

@whatisaphone
Forked from kmcallister/rust-backtrace
Created April 18, 2014 02:41
Show Gist options
  • Save whatisaphone/11022124 to your computer and use it in GitHub Desktop.
Save whatisaphone/11022124 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Usage: rust-backtrace ./my-rust-prog args...
exec gdb -batch -n -x /dev/fd/3 --args "$@" 3<<ENDGDB
set height 0
set breakpoint pending on
break rust_fail
commands 1
backtrace
quit
end
run
ENDGDB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment