summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-22 16:19:20 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-22 16:19:20 +0000
commit3e02ce770f3b26bf1307d741a15be7c804792e33 (patch)
tree1ff4b927720ccb8b0278c79822836d8b62fd4949
parent469e1ca0801a611274b7c48d6f951ffc2c008a37 (diff)
downloadhercules-3e02ce770f3b26bf1307d741a15be7c804792e33.tar.gz
hercules-3e02ce770f3b26bf1307d741a15be7c804792e33.tar.bz2
hercules-3e02ce770f3b26bf1307d741a15be7c804792e33.tar.xz
hercules-3e02ce770f3b26bf1307d741a15be7c804792e33.zip
- Did some testing and fixed a bit the updated tools/stackdump script.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7297 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--tools/stackdump16
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/stackdump b/tools/stackdump
index 1826b0c76..df460e824 100644
--- a/tools/stackdump
+++ b/tools/stackdump
@@ -27,17 +27,15 @@ case "$1" in
esac
# Check if server file needs .exe (Windows/Cygwin)
-if [ ! -e $SERVER ]; then
- if [ -e $SERVER.exe ]; then
- SERVER=$SERVER.exe
- else
- echo Error: $SERVER not found!
- exit
- fi
+if [ -e $SERVER.exe ]; then
+ SERVER="$SERVER.exe"
+elif [ ! -e $SERVER ]; then
+ echo Error: $SERVER not found!
+ exit
fi
# Assemble stackdump filename
-if [ $# > 2 ]; then
+if [ $# -gt 2 ]; then
STACK="$SERVER$3.stackdump"
else
STACK="$SERVER.stackdump"
@@ -57,7 +55,7 @@ fi
# Finally dump the backtrace
# If number is given, Sig-plugin format. otherwise, standard stackdump format
-if [ $# > 2 ]; then
+if [ $# -gt 2 ]; then
awk '$2 ~ /[0-9a-eA-E]\]$/{print $2}' $STACK | tr -d \[\] | addr2line -f -e $SERVER
else
awk '/^[0-9]/{print $2}' $STACK | addr2line -f -e $SERVER