GDB-gef
GNU Debugger (GNU), with the gef wrapper to provide us with extended features.
Commands
Cheatsheet link
1. Run the program
run,r
gdb <binary>
gef> run2. Breakpoints
2.1 Set breakpoint on the main function
gef> break main
gef> b main2.2 Navigate through the program
a. nexti: go instruction by instruction through the program, without stepping into function calls
b. next: go through each line of code, without stepping into function calls
c. stepi: go instruction by instruction, while stepping into function calls
d. step:  go through each line of code, while stepping into function calls
Summary table
nexti
Instructions
NO
next
Line of code (may consist of multiple instructions)
NO
stepi
Instructions
YES
step
Line of code (may consist of multiple instructions)
YES
2.3 Example on a specific instruction
Eg. hello world function
gef> disassemble main # "disass" works too
Dump of assembler code for function main:
   xxx
   0x0804840f <+20>:	push   0x80484b0
   0x08048414 <+25>:	call   0x80482d0 <puts@plt>
   xxx
End of assembler dump.Set breakpoint on the call to
puts
gef> break *main+25
gef> break *0x08048414
gef> break *puts2.4 Other commands
gef> info breakpoints
gef> delete <Num> # "del" or "d" works too3. Memory
gef> x/nfu <addresss>To print memory (refer to cheat sheet link above)
n: How many units to print (default 1)f: Format characteru: Unit
gef> x/a <address> # print pointer address
gef> x/10c <address> # print 10 chars
gef> x/s <address> # print as C stringLast updated