-
-
Save ongardie/aa15f1f0d0e6b59890a9 to your computer and use it in GitHub Desktop.
Run program through gdb to print backtrace on crash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
gdb -q --batch \ | |
-ex 'handle SIGHUP nostop pass' \ | |
-ex 'handle SIGQUIT nostop pass' \ | |
-ex 'handle SIGPIPE nostop pass' \ | |
-ex 'handle SIGALRM nostop pass' \ | |
-ex 'handle SIGTERM nostop pass' \ | |
-ex 'handle SIGUSR1 nostop pass' \ | |
-ex 'handle SIGUSR2 nostop pass' \ | |
-ex 'handle SIGCHLD nostop pass' \ | |
-ex 'set print thread-events off' \ | |
-ex 'run' \ | |
-ex 'thread apply all bt' \ | |
--tty=/dev/stdout \ | |
--args $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment