www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/26/10:09:41

Date: Tue, 26 Nov 1996 16:54:07 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Aaron Dwyer <adwyer AT galaxy DOT csc DOT calpoly DOT edu>
Cc: djgpp AT delorie DOT com
Subject: Re: GDB debugging
In-Reply-To: <579aaf$l6k@isnews.csc.calpoly.edu>
Message-Id: <Pine.SUN.3.91.961126164723.4395D-100000@is>
Mime-Version: 1.0

On Sun, 24 Nov 1996, Aaron Dwyer wrote:

> 	What kinds of clues regarding my bug can I get from knowing the
> program crashes on a function calling line?

That depends on what kind of clues are you looking for.  You don't
*really* expect GDB to say something like "hint: make that wild pointer
there to point to this buffer", do you? ;-)

For starters, posting the stack dump printed when your program crashes 
(outside GDB) will say a lot to people who understand it.  The GDB 
command `bt' (backtrace) will show you the entire calling sequence (who 
called who called who...) that lead to the crash.  But I usually examine 
the values of the variables near the point of crash first.

It is also useful sometimes to pull the source of `qsort' from the 
library sources and compile it with -g, so you can step inside it and see 
what exactly happens in that function.

- Raw text -


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