GDB Cheatsheet
Compile with debugging enabled:
gcc -g hello.c
Start GDB
gdb a.out
Break main
b main
Run
r
Step
s
Print variables:
p [variable]info locals
p [variable]
info locals
List code
l
Quit
q
https://www.youtube.com/watch?v=y5JmQItfFck
https://beej.us/guide/bggdb
http://darkdust.net/files/GDB%20Cheat%20Sheet.pdf