From 620e60eebce2c1f35c5c9a82f6ca365b316587f5 Mon Sep 17 00:00:00 2001 From: Valaris Date: Sun, 29 Jan 2006 16:10:48 +0000 Subject: AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec --- tools/stackdump | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 tools/stackdump (limited to 'tools/stackdump') diff --git a/tools/stackdump b/tools/stackdump new file mode 100644 index 000000000..d5e89f415 --- /dev/null +++ b/tools/stackdump @@ -0,0 +1,48 @@ +#!/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 \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 469e1ca0801a611274b7c48d6f951ffc2c008a37 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 22 Jun 2006 16:04:49 +0000 Subject: - Updated the tools/stackdump script to also handle sig-plugin generated backtraces. Now it will also auto-determine whether the exe needs a .exe at the end or not. - Usage is "stackdump [number]". When a number is given, sig-plugin stackdumps are assumed, otherwise it parses the normal stackdump as before. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7296 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 7 +++++++ tools/stackdump | 58 ++++++++++++++++++++++++++++++++++------------------- 2 files changed, 44 insertions(+), 21 deletions(-) (limited to 'tools/stackdump') diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 9da047964..9f49f4a82 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,13 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/06/22 + * Updated the tools/stackdump script to also handle sig-plugin generated + backtraces. Now it will also auto-determine whether the exe needs a .exe at + the end or not. Help me test it as I want this script on stable NOW :X + [Skotlex] + * Usage is "stackdump [number]". When a number + is given, sig-plugin stackdumps are assumed, otherwise it parses the normal + stackdump as before. [Skotlex] * Corrected autoloot so that you can specify rate with decimal precision ("@autoloot 0.01" should work) [Skotlex] 2006/06/21 diff --git a/tools/stackdump b/tools/stackdump index d5e89f415..1826b0c76 100644 --- a/tools/stackdump +++ b/tools/stackdump @@ -1,35 +1,47 @@ #!/bin/bash case "$1" in - ""|help) - echo "Usage 1: ${0##*/} [server-type] [sql]" + map|char|login) + # Check for SQL postfix + if [ "$2" = "sql" ]; then + SERVER="$1-server_sql" + else + SERVER="$1-server" + fi + ;; + + *|""|help) + echo "Usage 1: ${0##*/} [server-type] [txt/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 "Usage 2: ${0##*/} [server-type] [txt/sql] [number]" + echo Server type can be map, login, or char. Examples: + echo "$ ./${0##*/} map txt 0001" + echo "$ ./${0##*/} login sql 0002" echo echo Note: Dump files inside /log will also be scanned. exit ;; +esac - 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" - ;; +# 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 +fi - *) - STACK="$1$2.stackdump" - SERVER="$1.exe" - ;; -esac +# Assemble stackdump filename +if [ $# > 2 ]; then + STACK="$SERVER$3.stackdump" +else + STACK="$SERVER.stackdump" +fi # Check if file exists. # Try looking under '/log' if it isn't @@ -44,5 +56,9 @@ if [ ! -e $STACK ]; then fi # Finally dump the backtrace - -awk '/^[0-9]/{print $2}' $STACK | addr2line -f -e $SERVER \ No newline at end of file +# If number is given, Sig-plugin format. otherwise, standard stackdump format +if [ $# > 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 +fi -- cgit v1.2.3-70-g09d2 From 3e02ce770f3b26bf1307d741a15be7c804792e33 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 22 Jun 2006 16:19:20 +0000 Subject: - 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 --- tools/stackdump | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'tools/stackdump') 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 -- cgit v1.2.3-70-g09d2 From f1a7a5ee621c1712b719ae3b2053dafeda294e2d Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 22 Jun 2006 20:24:03 +0000 Subject: - Converted the line terminators of tools/stackdump to native. Fixes the script being unusable on *nix due to ^M terminator x.x git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7299 54d463be-8e91-2dee-dedb-b68131a5f0ec --- tools/stackdump | 124 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) (limited to 'tools/stackdump') diff --git a/tools/stackdump b/tools/stackdump index df460e824..25b1fa46a 100644 --- a/tools/stackdump +++ b/tools/stackdump @@ -1,62 +1,62 @@ -#!/bin/bash - -case "$1" in - map|char|login) - # Check for SQL postfix - if [ "$2" = "sql" ]; then - SERVER="$1-server_sql" - else - SERVER="$1-server" - fi - ;; - - *|""|help) - echo "Usage 1: ${0##*/} [server-type] [txt/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] [txt/sql] [number]" - echo Server type can be map, login, or char. Examples: - echo "$ ./${0##*/} map txt 0001" - echo "$ ./${0##*/} login sql 0002" - echo - echo Note: Dump files inside /log will also be scanned. - exit - ;; -esac - -# Check if server file needs .exe (Windows/Cygwin) -if [ -e $SERVER.exe ]; then - SERVER="$SERVER.exe" -elif [ ! -e $SERVER ]; then - echo Error: $SERVER not found! - exit -fi - -# Assemble stackdump filename -if [ $# -gt 2 ]; then - STACK="$SERVER$3.stackdump" -else - STACK="$SERVER.stackdump" -fi - -# 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 -# If number is given, Sig-plugin format. otherwise, standard stackdump format -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 -fi +#!/bin/bash + +case "$1" in + map|char|login) + # Check for SQL postfix + if [ "$2" = "sql" ]; then + SERVER="$1-server_sql" + else + SERVER="$1-server" + fi + ;; + + *|""|help) + echo "Usage 1: ${0##*/} [server-type] [txt/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] [txt/sql] [number]" + echo Server type can be map, login, or char. Examples: + echo "$ ./${0##*/} map txt 0001" + echo "$ ./${0##*/} login sql 0002" + echo + echo Note: Dump files inside /log will also be scanned. + exit + ;; +esac + +# Check if server file needs .exe (Windows/Cygwin) +if [ -e $SERVER.exe ]; then + SERVER="$SERVER.exe" +elif [ ! -e $SERVER ]; then + echo Error: $SERVER not found! + exit +fi + +# Assemble stackdump filename +if [ $# -gt 2 ]; then + STACK="$SERVER$3.stackdump" +else + STACK="$SERVER.stackdump" +fi + +# 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 +# If number is given, Sig-plugin format. otherwise, standard stackdump format +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 +fi -- cgit v1.2.3-70-g09d2 From 360cd95996dc6706d9a0fc6ad8a1769702ac281c Mon Sep 17 00:00:00 2001 From: ultramage Date: Mon, 4 Aug 2008 12:13:05 +0000 Subject: Attempt no.2 at svn:executable (followup to r13044) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13045 54d463be-8e91-2dee-dedb-b68131a5f0ec --- athena-start | 0 charserv-sql.bat | 0 charserv.bat | 0 logserv-sql.bat | 0 logserv.bat | 0 mapserv-sql.bat | 0 mapserv.bat | 0 runserver-sql.bat | 0 runserver.bat | 0 start | 0 tools/stackdump | 0 11 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 athena-start mode change 100644 => 100755 charserv-sql.bat mode change 100644 => 100755 charserv.bat mode change 100644 => 100755 logserv-sql.bat mode change 100644 => 100755 logserv.bat mode change 100644 => 100755 mapserv-sql.bat mode change 100644 => 100755 mapserv.bat mode change 100644 => 100755 runserver-sql.bat mode change 100644 => 100755 runserver.bat mode change 100644 => 100755 start mode change 100644 => 100755 tools/stackdump (limited to 'tools/stackdump') diff --git a/athena-start b/athena-start old mode 100644 new mode 100755 diff --git a/charserv-sql.bat b/charserv-sql.bat old mode 100644 new mode 100755 diff --git a/charserv.bat b/charserv.bat old mode 100644 new mode 100755 diff --git a/logserv-sql.bat b/logserv-sql.bat old mode 100644 new mode 100755 diff --git a/logserv.bat b/logserv.bat old mode 100644 new mode 100755 diff --git a/mapserv-sql.bat b/mapserv-sql.bat old mode 100644 new mode 100755 diff --git a/mapserv.bat b/mapserv.bat old mode 100644 new mode 100755 diff --git a/runserver-sql.bat b/runserver-sql.bat old mode 100644 new mode 100755 diff --git a/runserver.bat b/runserver.bat old mode 100644 new mode 100755 diff --git a/start b/start old mode 100644 new mode 100755 diff --git a/tools/stackdump b/tools/stackdump old mode 100644 new mode 100755 -- cgit v1.2.3-70-g09d2