From ca5ba625a50bbceb39b380552624c29cd1974501 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 10 Oct 2019 16:24:19 +0200 Subject: [PATCH] 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. --- tests/libtest.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/libtest.sh b/tests/libtest.sh index 61bc3038..17e2b8ce 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -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