The gdb debugger on a page Wed Mar 7 11:19:40 EST 2001 $ g++ -g whatever.c (or gcc -g whatever.c) $ gdb a.out [core] run [args] bt stack backtrace ("where" is synonym) break [file:]function print expr run [args] start it running, with optional commandline arguments c continue after stopping n[ext] next line, stepping over functions s[tep] next line, stepping into functions list up move up in call stack (towards main) down move down in call stack help info quit e.g., to see where a program died, gdb a.out core where ... e.g., to run a program from gdb, gdb a.out break main (or break hello.c:main) run n n s print i print v[i] ...