Jump to content

Recommended Posts

Posted

Can some 1 please help me out... I'm on ubuntu and I'm kinda new to linux... I'm using run-mangosd bash file to keep mangosd up even after crash but I also wanna use GDB debug tool and also to save the crash dumps in files

the current run-mangosd is

#!/bin/bash
# Massive Network Game Object Server
# autorestart Script

while :
do
       echo "MaNGOS daemon restarted"
       echo `date` >> crash.log &
       ./mangos-worldd | tail -n 20 >> crash.log
       echo " " >> crash.log &
       pid=`ps ax | awk '($5 ~ /mangos-worldd/) { print $1 }'`
       wait $pid
       echo `date` ", MaNGOS daemon crashed and restarted." >> serverlog
done

Since GDB has its own command line so I dont understand how to do it...

Would really appreciate it Thanks :)

Posted

These lines run it with gdb (remove the crap for crash.log in your script)

http://paste2.org/p/1376655

Save this script as "debugger":

run
shell echo -e "\\nCRASH ON" `date`
info program
shell echo -e "\\nBACKTRACE\\n"
bt
shell echo -e "\\nBACKTRACE FULL\\n"
bt full
shell echo -e "\\nTHREADS\\n"
info threads
thread apply all bt full

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use