selftest: Improve gdb_backtrace to run in batch mode
authorAndrew Bartlett <abartlet@samba.org>
Tue, 22 Feb 2011 01:28:33 +0000 (12:28 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 22 Feb 2011 05:20:10 +0000 (16:20 +1100)
Following Tridge's advice, we need to have no input (/dev/null) and
-batch for reliable opeation on big backtraces.

We should also use --pid, and let gdb find the binary

Andrew Bartlett

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}"