gdb 来进行调试所需的每个命令。
Command Description
file load program
b set breakpoint
r run
c continue
s step (line)
si step (machine instruction)
n next (step over function call)
finish run until function returns
i r show all registers
i r show specific register
l list source
p display value
set args set command line arguments
参考网站:
http://chinalinuxpub.com/read.htm?id=1392