
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
48 lines
1.0 KiB
Bash
48 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
case "$1" in
|
|
""|help)
|
|
echo "Usage 1: ${0##*/} [server-type] [sql]"
|
|
echo Server type can be map, login, or char. Examples:
|
|
echo "$ ./${0##*/} map"
|
|
echo "$ ./${0##*/} login sql"
|
|
echo
|
|
echo "Usage 2: ${0##*/} [server-type] [number]"
|
|
echo Server type has to be the full name of the file. Examples:
|
|
echo "$ ./${0##*/} map-server 0001"
|
|
echo "$ ./${0##*/} login-server_sql 0002"
|
|
echo
|
|
echo Note: Dump files inside /log will also be scanned.
|
|
exit
|
|
;;
|
|
|
|
map|char|login)
|
|
# Check for SQL postfix
|
|
if [ "$2" = "sql" ]; then
|
|
sql="_sql"
|
|
fi
|
|
STACK="$1-server$sql.exe.stackdump"
|
|
SERVER="$1-server$sql.exe"
|
|
;;
|
|
|
|
*)
|
|
STACK="$1$2.stackdump"
|
|
SERVER="$1.exe"
|
|
;;
|
|
esac
|
|
|
|
# Check if file exists.
|
|
# Try looking under '/log' if it isn't
|
|
|
|
if [ ! -e $STACK ]; then
|
|
if [ -e log/$STACK ]; then
|
|
STACK=log/$STACK
|
|
else
|
|
echo Error: $STACK not found!
|
|
exit
|
|
fi
|
|
fi
|
|
|
|
# Finally dump the backtrace
|
|
|
|
awk '/^[0-9]/{print $2}' $STACK | addr2line -f -e $SERVER |