summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 13:03:49 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 13:08:04 +1000
commit54d8836a84eeeefe6310a1a064d416b55aa169b8 (patch)
treeadeab1cb996a2f84185d46707faf2dabfb0b7185 /source3
parent3d08e844fc2870387449850342091ae621bd938d (diff)
downloadsamba-54d8836a84eeeefe6310a1a064d416b55aa169b8.tar.gz
samba-54d8836a84eeeefe6310a1a064d416b55aa169b8.tar.bz2
samba-54d8836a84eeeefe6310a1a064d416b55aa169b8.zip
s3-selftest Remove unused gdb_backtrace
The version in selftest/ has more features and is the one used by 'make test'. Andrew Bartlett
Diffstat (limited to 'source3')
-rwxr-xr-xsource3/script/tests/gdb_backtrace87
1 files changed, 0 insertions, 87 deletions
diff --git a/source3/script/tests/gdb_backtrace b/source3/script/tests/gdb_backtrace
deleted file mode 100755
index 826381e900..0000000000
--- a/source3/script/tests/gdb_backtrace
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-
-BASENAME=`basename $0`
-
-if [ -n "$VALGRIND" -o -n "$SMBD_VALGRIND" ]; then
- echo "${BASENAME}: Not running debugger under valgrind"
- exit 1
-fi
-
-# we want everything on stderr, so the program is not disturbed
-exec 1>&2
-
-BASENAME=`basename $0`
-UNAME=`uname`
-
-PID=$1
-BINARY=$2
-
-test x"${PID}" = x"" && {
- echo "Usage: ${BASENAME} <pid> [<binary>]"
- exit 1
-}
-
-DB_LIST="gdb"
-case "${UNAME}" in
- #
- # on Tru64 we need to try ladebug first
- # because gdb crashes itself...
- #
- OSF1)
- DB_LIST="ladebug ${DB_LIST}"
- ;;
-esac
-
-for DB in ${DB_LIST}; do
- DB_BIN=`which ${DB} 2>/dev/null | grep '^/'`
- test x"${DB_BIN}" != x"" && {
- break
- }
-done
-
-test x"${DB_BIN}" = x"" && {
- echo "${BASENAME}: ERROR: No debugger found."
- exit 1
-}
-
-#
-# we first try to use /proc/${PID}/exe
-# then fallback to the binary from the commandline
-# then we search for the commandline argument with
-# 'which'
-#
-test -f "/proc/${PID}/exe" && BINARY="/proc/${PID}/exe"
-test x"${BINARY}" = x"" && BINARY="/proc/${PID}/exe"
-test -f "${BINARY}" || BINARY=`which ${BINARY}`
-
-test -f "${BINARY}" || {
- echo "${BASENAME}: ERROR: Cannot find binary '${BINARY}'."
- exit 1
-}
-
-echo "${BASENAME}: Trying to use ${DB_BIN} on ${BINARY} on PID ${PID}"
-
-BATCHFILE_PRE=/tmp/gdb_backtrace_pre.$$
-BATCHFILE_MAIN=/tmp/gdb_backtrace_main.$$
-case "${DB}" in
- ladebug)
-cat << EOF > ${BATCHFILE_PRE}
-set \$stoponattach
-EOF
-
-cat << EOF > ${BATCHFILE_MAIN}
-where
-quit
-EOF
- ${DB_BIN} -c "${BATCHFILE_MAIN}" -i "${BATCHFILE_PRE}" -pid "${PID}" "${BINARY}"
- ;;
- gdb)
-cat << EOF > ${BATCHFILE_MAIN}
-set height 1000
-bt full
-quit
-EOF
- ${DB_BIN} -x "${BATCHFILE_MAIN}" "${BINARY}" "${PID}"
- ;;
-esac
-/bin/rm -f ${BATCHFILE_PRE} ${BATCHFILE_MAIN}