build: update gdb_backtrace to make it search for gdb66 as it work on freebsd
[gd/samba-autobuild/.git] / selftest / gdb_backtrace
index e38c451d426a76106353911026ec9df1c67f5692..91637ec40c8d1f49d6e89c712e8a5ba905cb4abd 100755 (executable)
@@ -37,6 +37,13 @@ case "${UNAME}" in
        SunOS)
                DB_LIST="dbx ${DB_LIST}"
        ;;
+       #
+       # FreeBSD comes with a flavor that works gdb66 and one that don't gdb
+       # (gdb 6.1) let's try it first the one that works !
+       #
+       FreeBSD)
+               DB_LIST="gdb66 ${DB_LIST}"
+       ;;
 esac
 
 for DB in ${DB_LIST}; do
@@ -83,6 +90,16 @@ quit
 EOF
        ${DB_BIN} -c "${BATCHFILE_MAIN}" -i "${BATCHFILE_PRE}" -pid "${PID}" "${BINARY}"
        ;;
+       gdb66)
+cat << EOF  > ${BATCHFILE_MAIN}
+set height 1000
+bt full
+info locals
+kill
+quit
+EOF
+       ${DB_BIN} -x "${BATCHFILE_MAIN}" "${BINARY}" "${PID}"
+       ;;
        gdb)
 cat << EOF  > ${BATCHFILE_MAIN}
 set height 1000