- publishing free software manuals
An Introduction to GCC - for the GNU compilers gcc and g++
by Brian J. Gough, foreword by Richard M. Stallman
Paperback (6"x9"), 144 pages
ISBN 0954161793
RRP £12.95 ($19.95)

"An excellent introduction... fills a much-needed niche in the marketplace" --- Association of C and C++ Users book review (Issue 16-4, August 2004) Get a printed copy>>>

5.2 Displaying a backtrace

The debugger can also show the function calls and arguments up to the current point of execution--this is called a stack backtrace and is displayed with the command backtrace:

(gdb) backtrace
#0  0x080483ed in foo (p=0x0) at null.c:13
#1  0x080483d9 in main () at null.c:7

In this case, the backtrace shows that the crash occurred at line 13 after the function foo was called from main with an argument of p=0x0 at line 7 in ‘null.c’. It is possible to move to different levels in the stack trace, and examine their variables, using the debugger commands up and down.

ISBN 0954161793An Introduction to GCC - for the GNU compilers gcc and g++See the print edition