selftest: Improve gdb_backtrace to run in batch mode
[garming/samba-autobuild/.git] / selftest / gdb_backtrace
index 91637ec40c8d1f49d6e89c712e8a5ba905cb4abd..553181414992ed5633f315e3eda42f83ece32c70 100755 (executable)
@@ -102,12 +102,13 @@ EOF
        ;;
        gdb)
 cat << EOF  > ${BATCHFILE_MAIN}
-set height 1000
+set height 0
 bt full
+thread apply all bt full
 info locals
 quit
 EOF
-       ${DB_BIN} -x "${BATCHFILE_MAIN}" "${BINARY}" "${PID}"
+       ${DB_BIN} -batch -x "${BATCHFILE_MAIN}" --pid "${PID}" < /dev/null
        ;;
 dbx)
        ${DB_BIN} "where;dump;kill;quit" "${BINARY}" "${PID}"