It allows you to see what is going on inside another program while it executes or what another program was doing at the moment it crashed. Gdb requires gcc to be used when building it from source code and it also needs gcc to create gdb-debuggable binaries. Gdb cannot debug binaries built with HP's ANSI C or C++ compilers.