From: "Carolyn Kelly-Pajot" References: <63m4mh$qjl$1 AT news DOT interlog DOT com> Subject: Re: Tracking down where GPFs occur . How? (DJGPP+Allegro) Date: Tue, 4 Nov 1997 20:01:54 -0500 Lines: 32 Message-ID: Newsgroups: comp.os.msdos.djgpp To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Gautam N. Lad wrote in message <63m4mh$qjl$1 AT news DOT interlog DOT com>... >Hi, >Is there any way to determine where a program is causing a GPF? >I get all the code like General Protection Fault at eip=(whatever). >and some other (unknown to me) stuff. > >Could this be used to pinpoint where in a program's source (hopefully a .CPP/.C >or .HPP/.H) it's happening? > >Thanks! >Bye! > >------------------------------------------------------------- >Gautam N. Lad >------------------------------------------------------------- >E-Mail: gautam AT interlog DOT com >Website: http://www.interlog.com/~gautam > >POV-Ray Software, Gallery, and Links! >------------------------------------------------------------- Use a debugger. Rhide comes with one build-in. Just make sure the compiler is run with the -g command. Insert breakpoints, and run the program from the debugger. If you get an error message, the error is before that. If you see a blue line wheere your breakpoint is, it means it made it and is waiting to execute THAT line. There is also a "step over" command which does 1 line at a time. Rhide can also give a more specific stack pointer (probably because of debugging). Try re-compiling the ALLEGRO library with debugging to see if that is the problem. I have had a few problems...