18 lines
336 B
Bash
Executable File
18 lines
336 B
Bash
Executable File
#!/usr/bin/env zsh
|
|
# Get backtrace from gdb
|
|
|
|
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
|
|
|
|
autoload -U die
|
|
|
|
[[ ${ARGC} -ne 2 ]] && die 1 "Usage: ${0} <executable> <core dump>"
|
|
local exe="${1}"
|
|
local core="${2}"
|
|
|
|
gdb "${exe}" \
|
|
--core "${core}" \
|
|
--batch \
|
|
--quiet \
|
|
-ex "thread apply all bt full" \
|
|
-ex "quit"
|