1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r19149: ladebug needs to have the stoponattach flag set

to generate the current backtrace without waiting for a signal...

metze
(This used to be commit d86100289a)
This commit is contained in:
Stefan Metzmacher 2006-10-06 17:55:17 +00:00 committed by Gerald (Jerry) Carter
parent 47f90dde40
commit 9db9ce6087

View File

@ -61,22 +61,27 @@ test -f "${BINARY}" || {
echo "${BASENAME}: Trying to use ${DB_BIN} on ${BINARY} on PID ${PID}"
BATCHFILE=/tmp/gdb_backtrace.$$
BATCHFILE_PRE=/tmp/gdb_backtrace_pre.$$
BATCHFILE_MAIN=/tmp/gdb_backtrace_main.$$
case "${DB}" in
ladebug)
cat << EOF > ${BATCHFILE}
cat << EOF > ${BATCHFILE_PRE}
set \$stoponattach
EOF
cat << EOF > ${BATCHFILE_MAIN}
where
quit
EOF
${DB_BIN} -c "${BATCHFILE}" -pid "${PID}" "${BINARY}"
${DB_BIN} -c "${BATCHFILE_MAIN}" -i "${BATCHFILE_PRE}" -pid "${PID}" "${BINARY}"
;;
gdb)
cat << EOF > ${BATCHFILE}
cat << EOF > ${BATCHFILE_MAIN}
set height 1000
bt full
quit
EOF
${DB_BIN} -x "${BATCHFILE}" "${BINARY}" "${PID}"
${DB_BIN} -x "${BATCHFILE_MAIN}" "${BINARY}" "${PID}"
;;
esac
/bin/rm -f ${BATCHFILE}
/bin/rm -f ${BATCHFILE_PRE} ${BATCHFILE_MAIN}