Mail Archives: djgpp/1998/01/24/15:31:59
On Fri, 23 Jan 1998 02:38:18 GMT, ernomat AT evitech DOT fi (Erno Tuomainen)
wrote:
> Could someone help me with DEBUGGING in DJGPP. I recently have
>stumbled into a mysterious bug in my roguelike game (Legend of
>Saladir) which just doesn't seem to disappear even I have tried my
>best, but without debugger to this point.
Nobody helped out (yet)! So I reply to this post myself.
I managed to get GDB and debug that slimy bug out. Ooh, I love GDB.
After I started my game with GDB and played it a while it said that
my game stopped to SIGSEGV (segment violation) at function
Monster_movetotarget(). It even pointed out the particular source line
which caused the error. Yeah, and there it was, when accessing a two
dimensional array I had misplaced the X and Y coordinates .. :) Table
was looked over boundaries and KABOOM.
Yeah, that answers my question about debugging. This one was really
easy to find.
I had some problems when GDB couldn't find my *.CPP files, it tried
to load *.CC files always. So I just had to rename the files to *.CC
and it worked.
And of course it must be compiled with '-g' option so that debugging
does work.
---
Erno Tuomainen -+- A Computer Engineering student at Helsinki/Finland
+ ernomat AT evitech DOT fi at www.evitech.fi/~ernomat
+
- Raw text -