get started

Configuration

# the configuration file is ~/.gdbinit
set disassembly-flavor intel

Analysis

#disassemble main function
disassemble main
#look at the register
info registers
#change register's value
set $eax=0

Instruction flow

#run the program with given argument
run <argument>

#step into one instructions
#(will step into function calls)
si

#step over one instructions
#(will *not* step into function calls)
ni

Breakpoint

#set breakpoint at main function
break *main

examin win function
x win

print win fucntion
f win