Degugging C Programs with GDB - For very tricky bugs in my C programs on Linux, I sometimes turn to gdb. Helpful commands to know: p - print n - next line s - step into next line b - break at a line l - list lines of the program run - start program execution q - quit