summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-02-22 12:28:33 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-02-22 16:20:10 +1100
commit985c7da604ac30e67ee4b5a829935074900d6f26 (patch)
tree430fcc411bc03a2e2c5ffe8c9f4ed4bd8df3cea1
parent6c1ce36ec97525774aaba294f48fbd6fab15a80e (diff)
downloadsamba-985c7da604ac30e67ee4b5a829935074900d6f26.tar.gz
samba-985c7da604ac30e67ee4b5a829935074900d6f26.tar.bz2
samba-985c7da604ac30e67ee4b5a829935074900d6f26.zip
selftest: Improve gdb_backtrace to run in batch mode
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
-rwxr-xr-xselftest/gdb_backtrace5
1 files changed, 3 insertions, 2 deletions
diff --git a/selftest/gdb_backtrace b/selftest/gdb_backtrace
index 91637ec40c..5531814149 100755
--- a/selftest/gdb_backtrace
+++ b/selftest/gdb_backtrace
@@ -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}"