The Gnu DeBugger

  1. In order to prepare your code for use in gdb, it must be compiled with the '-g' flag.
  2. set breakpoints
  3. set watchpoints
  4. run
    Type 'run' followed by any arguements or redirection you would normally use in your program.
  5. list
    List the source code at your current location in the program.
  6. print values
  7. continue, step, next, and finish
  8. clear breakpoints
notes:
Other References