libtest.sh: Add gdb_bt helper

This is unused, but can be inserted in the tests if something is
segfaulting so that you can see the backtrace.
This commit is contained in:
Alexander Larsson
2019-10-10 16:24:19 +02:00
committed by Alexander Larsson
parent 0af4249c60
commit ca5ba625a5

View File

@@ -444,6 +444,10 @@ if ! /bin/kill -0 "$DBUS_SESSION_BUS_PID"; then
assert_not_reached "Failed to start dbus-daemon"
fi
gdb_bt () {
gdb -batch -ex "run" -ex "thread apply all bt" -ex "quit 1" --args "$@"
}
cleanup () {
/bin/kill -9 $DBUS_SESSION_BUS_PID
gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye || true