www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/23/14:49:33

Date: Wed, 23 Sep 1998 20:29:56 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Victor <fesenko AT pacific DOT net DOT sg>
cc: djgpp AT delorie DOT com
Subject: Re: Debugging after program crashes
In-Reply-To: <3609854d.114750420@news>
Message-ID: <Pine.SUN.3.91.980923202456.3543B-100000@is>
MIME-Version: 1.0

On Wed, 23 Sep 1998, Victor wrote:

> I've read the chapter in the new FAQ that discusses the subject. It is
> very insightful (thanks to Eli for that).

You are welcome.

> I have a situation where the first (or is it called last?) entry in
> the traceback list shows the function which is not called from the
> previous function at all. Which leads to a suggestion that the RAM in
> that place was corrupted by another process.

Not necessarily.  It could be that the conversion of the address into a 
symbolic name is inaccurate, due to deficiencies of the COFF debug info.

The best way to be sure is to disassemble the program at the address 
shown in the traceback, and then try to figure out where did you land.  
It can be tricky, but it's possible.

> So the question is - does anyone know how to hook exception (SIGSEGV
> or page fault) for the purpose of saving to a file the memory contents
> from around the locations indicated by traceback list?

If you can run the program under a debugger until it crashes, this is 
trivial.

Otherwise, George Foot posted some time ago information about a 
postmortem debugger that is built around such a facility.  Try searching 
the mail archives for something like "core dump" etc.

Or just hang around and wait for George to kick in ;-).

- Raw text -


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