Last active
July 15, 2020 20:40
-
-
Save pallas/035bf6beb9bbf0872d84b38ebacb0cde to your computer and use it in GitHub Desktop.
GDB wrapper to produce backtrace automatically
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/bash | |
# SPDX-License-Identifier: Unlicense | |
# Author: Derrick Lyndon Pallas <[email protected]> | |
[ $# -gt 0 ] && | |
exec gdb "$1" --return-child-result --silent --batch \ | |
--ex "run $([ $# -gt 1 ] && printf '%q ' "${@:2}")" \ | |
--ex bt \ | |
2>/dev/null | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment