The gdb debugger on a page Sat Feb 10 16:49:27 EST 2007 gdb is mostly for C and C++, though perhaps it works with other languages too. It's commandline based; there are also graphical interfaces that might be easier to use, but I have no experience with any of them. $ gcc -g whatever.c (or g++ -g whatever.c) $ gdb a.out [core] (or gdb or gdb progname [core]) run [args] args can include * < > etc. bt stack backtrace ("where" is synonym) break [file:]function print expr run [args] start it running, with optional commandline arguments c[ont] continue after stopping n[ext] next line, stepping over functions s[tep] next line, stepping into functions list [n] show 10 lines around line n; each "list" advances up move up in call stack (towards main) down move down in call stack (away from main) frame n move to frame #n 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