From 7e2b315ca0f228b617adc7769f3880a8aabd5d67 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sun, 28 Nov 2010 13:53:40 +0300 Subject: add handling for solaris Autobuild-User: Matthieu Patou Autobuild-Date: Sun Nov 28 13:32:21 CET 2010 on sn-devel-104 --- selftest/gdb_backtrace | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'selftest/gdb_backtrace') diff --git a/selftest/gdb_backtrace b/selftest/gdb_backtrace index 1d8249b08a..5a7d2307bd 100755 --- a/selftest/gdb_backtrace +++ b/selftest/gdb_backtrace @@ -30,6 +30,12 @@ case "${UNAME}" in OSF1) DB_LIST="ladebug ${DB_LIST}" ;; + # + # On solaris dbx is working way more better than gdb + # let's try it first + # + SunOS) + DB_LIST="dbx ${DB_LIST}" esac for DB in ${DB_LIST}; do @@ -45,12 +51,13 @@ test x"${DB_BIN}" = x"" && { } # -# we first try to use /proc/${PID}/exe +# we first try to use /proc/${PID}/exe or /proc/{$PID}/path for solaris # 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 -f "/proc/${PID}/path/a.out" && BINARY=`ls -l /proc/${PID}/path/a.out |sed 's/.*-> //'` test x"${BINARY}" = x"" && BINARY="/proc/${PID}/exe" test -f "${BINARY}" || BINARY=`which ${BINARY}` @@ -84,5 +91,8 @@ quit EOF ${DB_BIN} -x "${BATCHFILE_MAIN}" "${BINARY}" "${PID}" ;; +dbx) + ${DB_BIN} "where;dump;kill;quit" "${BINARY}" "${PID}" + ;; esac /bin/rm -f ${BATCHFILE_PRE} ${BATCHFILE_MAIN} -- cgit