Improve test framework: fix tfw_core_backtrace

Was not actually printing a gdb backtrace
This commit is contained in:
Andrew Bettison 2012-07-25 16:59:48 +09:30
parent 6e7c2196ba
commit ba69ae616f

View File

@ -564,9 +564,11 @@ tfw_cat() {
tfw_core_backtrace() {
local executable="$1"
local corefile="$2"
echo backtrace >"$_tfw_tmpdir/backtrace.gdb"
tfw_log "#--- gdb backtrace from $executable $corefile ---"
echo backtrace | gdb -batch "$executable" "$corefile"
gdb -n -batch -x "$_tfw_tmpdir/backtrace.gdb" "$executable" "$corefile" </dev/null
tfw_log "#---"
rm -f "$_tfw_tmpdir/backtrace.gdb"
}
assertExitStatus() {