Smaug core dump =P

Posted by Dace K on Fri 14 May 2004 08:16 PM — 6 posts, 24,448 views.

Canada #0
Hey.. I have a minor problem in that I can't find the core dump for my smaug mud =P.

The closest thing I can find is a SMAUG.EXE.stackdump file that appears in my area folder.. however, when I try to run gdb on it, I get the message ....../SMAUG.EXE.stackdump" is not a coredump: File format not recognized.

The sigsev handler's commented out.. not sure what else to do. Any help'd be appreciated. Ty!
USA #1
How big is your .stackdump file? What system are you running on?
Canada #2
Have you set your OS to actually produce a core? If you haven't, are you using a startup file that might do it for you?
Canada #3
Ah, sorry.. forgot about this thread.

I've figured out core dumps, but.. I was wondering
if anyone could help me out with something different.

For some reason, my game seems to freeze at odd occasions.
And since it merely freezes, not crashes, I have to kill the process manually and there's no stackdump.

Anyone have any ideas on how to debug this?
Australia Forum Administrator #4
Read my write-up on using gdb (one level up in the forum), namely:

http://www.gammon.com.au/forum/?bbsubject_id=3653

Start up gdb with the process-ID of the process in question.

eg.

gdb ../src/smaug.exe 12345

Press Ctrl+C to break into the execution.

Then type "bt" to see where in the program you are. Sounds like you are in a CPU loop. For example, you might be looping through an inventory with a "looped" list, where the last item points back to the first item, so it never gets to the end of the list.

#5
Hi,
I know you said you figured out core already, but I thought I'd post the answer for anyone else with the question.
For core dumps on cygwin, you can only use GDB for live debugging. Use awk to read the .EXE.stackdump files.
I'm using circlemud and this is the line I use:
awk '/^[0-9]/{print $2}' lib/circlemud.exe.stackdump | addr2line -f -e bin/circle.exe
Hope this helps anyone who needs the help.
-Kpz