GDB Tutorial

GDB (GNU Project debugger) is a command line base debugger that is good at analyzing running and cored programs. According to the user manual GDB supports C, C++, D, Go, Objective-C, Fortran, Java, OpenCL C, Pascal, Rust, assembly, Modula-2, and Ada.

GDB has the same feature set as most debuggers but is different from most that I have used in that is all based on typing commands instead of clicking on GUI elements. Some of these features include:

  • Setting break points
  • Printing the value of variables.
  • Setting the value of variables to test things out.
  • Viewing the stack