Track down those segfaults Now we’ve got an idea of how GDB works, lets look at a more complex example. The program in Listing 2 (see bottom of page) should print out a familiar character in your terminal window. It uses a C array called template to determine where to print out a character versus a space. […]
In a NutshellI write handy little guides to GDB, C and C++, and occasionally some Linux stuff for fun.