Changeset 745 for trunk/server/selftest/gdb_backtrace
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/selftest/gdb_backtrace
r414 r745 31 31 DB_LIST="ladebug ${DB_LIST}" 32 32 ;; 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 ;; 33 47 esac 34 48 … … 46 60 47 61 # 48 # we first try to use /proc/${PID}/exe 62 # we first try to use /proc/${PID}/exe or /proc/{$PID}/path for solaris 49 63 # then fallback to the binary from the commandline 50 64 # then we search for the commandline argument with … … 52 66 # 53 67 test -f "/proc/${PID}/exe" && BINARY="/proc/${PID}/exe" 68 test -f "/proc/${PID}/path/a.out" && BINARY=`ls -l /proc/${PID}/path/a.out |sed 's/.*-> //'` 54 69 test x"${BINARY}" = x"" && BINARY="/proc/${PID}/exe" 55 70 test -f "${BINARY}" || BINARY=`which ${BINARY}` … … 76 91 ${DB_BIN} -c "${BATCHFILE_MAIN}" -i "${BATCHFILE_PRE}" -pid "${PID}" "${BINARY}" 77 92 ;; 78 gdb )93 gdb66) 79 94 cat << EOF > ${BATCHFILE_MAIN} 80 95 set height 1000 81 96 bt full 97 info locals 98 kill 82 99 quit 83 100 EOF 84 101 ${DB_BIN} -x "${BATCHFILE_MAIN}" "${BINARY}" "${PID}" 85 102 ;; 103 gdb) 104 cat << EOF > ${BATCHFILE_MAIN} 105 set height 0 106 bt full 107 thread apply all bt full 108 info locals 109 quit 110 EOF 111 ${DB_BIN} -batch -x "${BATCHFILE_MAIN}" --pid "${PID}" < /dev/null 112 ;; 113 dbx) 114 ${DB_BIN} "where;dump;kill;quit" "${BINARY}" "${PID}" 115 ;; 86 116 esac 87 117 /bin/rm -f ${BATCHFILE_PRE} ${BATCHFILE_MAIN}
Note:
See TracChangeset
for help on using the changeset viewer.