20 lines
390 B
Plaintext
20 lines
390 B
Plaintext
|
# -*- mode: shell-script; -*-
|
||
|
|
||
|
# Get backtrace from gdb
|
||
|
function gdb_get_backtrace()
|
||
|
{
|
||
|
if [[ ${ARGC} -ne 2 ]]; then
|
||
|
print -u 2 "Usage: ${0} <executable> <core dump>"
|
||
|
return 1
|
||
|
fi
|
||
|
local exe="${1}"
|
||
|
local core="${2}"
|
||
|
|
||
|
gdb "${exe}" \
|
||
|
--core "${core}" \
|
||
|
--batch \
|
||
|
--quiet \
|
||
|
-ex "thread apply all bt full" \
|
||
|
-ex "quit"
|
||
|
}
|