Date: Wed, 23 Sep 1998 20:29:56 +0300 (IDT) From: Eli Zaretskii To: Victor cc: djgpp AT delorie DOT com Subject: Re: Debugging after program crashes In-Reply-To: <3609854d.114750420@news> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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 ;-).