Mail Archives: djgpp/1996/11/26/10:09:41
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 -