Compile
This will compile in debug mode and include symbols
gcc -ggdb cprog.c -o cprog
Load exec in gdb
Set breakpoint on main
Show instructions for main function
Show all functions
Show all variables
This will only work if the program is compiled in debug mode (with symbols)
List breakpoints
Break on a specific memory address
Show register values
Show multiple register values
View value for a particular register
String value:
Int value:
Restart program
Delete breakpoint
View multiple lines from $esp
Step line-by-line