Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/selftest/gdb_backtrace

    r414 r745  
    3131                DB_LIST="ladebug ${DB_LIST}"
    3232        ;;
     33        #
     34        # On solaris dbx is working way more better than gdb
     35        # let's try it first
     36        #
     37        SunOS)
     38                DB_LIST="dbx ${DB_LIST}"
     39        ;;
     40        #
     41        # FreeBSD comes with a flavor that works gdb66 and one that don't gdb
     42        # (gdb 6.1) let's try it first the one that works !
     43        #
     44        FreeBSD)
     45                DB_LIST="gdb66 ${DB_LIST}"
     46        ;;
    3347esac
    3448
     
    4660
    4761#
    48 # we first try to use /proc/${PID}/exe
     62# we first try to use /proc/${PID}/exe or /proc/{$PID}/path for solaris
    4963# then fallback to the binary from the commandline
    5064# then we search for the commandline argument with
     
    5266#
    5367test -f "/proc/${PID}/exe" && BINARY="/proc/${PID}/exe"
     68test -f "/proc/${PID}/path/a.out" && BINARY=`ls -l /proc/${PID}/path/a.out |sed 's/.*-> //'`
    5469test x"${BINARY}" = x"" && BINARY="/proc/${PID}/exe"
    5570test -f "${BINARY}" || BINARY=`which ${BINARY}`
     
    7691        ${DB_BIN} -c "${BATCHFILE_MAIN}" -i "${BATCHFILE_PRE}" -pid "${PID}" "${BINARY}"
    7792        ;;
    78         gdb)
     93        gdb66)
    7994cat << EOF  > ${BATCHFILE_MAIN}
    8095set height 1000
    8196bt full
     97info locals
     98kill
    8299quit
    83100EOF
    84101        ${DB_BIN} -x "${BATCHFILE_MAIN}" "${BINARY}" "${PID}"
    85102        ;;
     103        gdb)
     104cat << EOF  > ${BATCHFILE_MAIN}
     105set height 0
     106bt full
     107thread apply all bt full
     108info locals
     109quit
     110EOF
     111        ${DB_BIN} -batch -x "${BATCHFILE_MAIN}" --pid "${PID}" < /dev/null
     112        ;;
     113dbx)
     114        ${DB_BIN} "where;dump;kill;quit" "${BINARY}" "${PID}"
     115        ;;
    86116esac
    87117/bin/rm -f ${BATCHFILE_PRE} ${BATCHFILE_MAIN}
Note: See TracChangeset for help on using the changeset viewer.