www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/13/10:30:47

Date: Wed, 13 Nov 1996 17:15:47 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Martin....." <beable AT magna DOT com DOT au>
Cc: djgpp AT delorie DOT com
Subject: Re: Post mortem debugging and the like...Help...
In-Reply-To: <3289C871.58DE@magna.com.au>
Message-Id: <Pine.SUN.3.91.961113170623.5516C-100000@is>
Mime-Version: 1.0

On Wed, 13 Nov 1996, Martin..... wrote:

> dam fine compiler I might add) and was wondering if there was any way of
> having a post portem debugging environment. I'm talking about something
> like what the old modula-2 compilers used to have, where if an
> unexpected crash occured, the compiled program would write out a dump
> file which could later be analized with a debug version of the code.

DJGPP programs cannot dump a debuggable core, but they print a stack dump 
which can be easily converted into a human-readable list of filenames and 
source line numbers which led to a crash.  DJGPP comes with a program 
named `symify' which does this magic.  Check out section 9.2 of the DJGPP 
FAQ list (available as v2/faq202b.zip from the same place you get DJGPP) 
for more details about `symify'.  (You should probably read the FAQ 
anyway, since you just begin to get acquainted with DJGPP.)

> bug reports required the eight-digit number which comes after the eip=.
> I take it that this comes from Charles Sandman's DPMI.

No, they usually come from the exception-handling code which gets linked 
into every DJGPP program.  DJGPP programs will print the stack and 
registers dump with *any* DPMI server, not only CWSDPMI.  CWSDPMI doesn't 
even know enough about your program to print this, since the program 
might crash outside any DPMI call.

> 	Of what value is the 'eip=' number and is this a pointer or clue as to
> what could have gone wrong in the program?? Is there any other method of
> debugging a DJGPP executable after the fact??

After you use `symify', you are supposed to run your program under a 
debugger, put a breakpoint at the place that caused the crash (as 
indicated by `symify') and debug the reason as usual.  Again, read the 
above section of the FAQ for details.  The FAQ also includes a separate 
chapter 12 that discusses issues pertinent to debugging DJGPP programs.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019