To get started, compile with the
g flag to get debugging information in the
gcc -g -o main main.c library.c header.h
gdb to enter the interpreter.
Once in the GDB interpreter run the following:
run: Runs the program in it's entirety. Also accepts arguments that would normally be passed in the command line.
b: Sets a breakpoint at the given function.
s: Steps to the next line.
n: Run until the current function finishes.