The GNU Debugger allows you to see what is going on "inside" a program while it executes - or what a program was doing at the moment it crashed.
GDB supports C, C++, Java, Fortran and Assembly among other languages; it is also designed to work closely with the GNU Compiler Collection (GCC).
1