l: list current code
start: start programe and start in step mode
s: step to next sentence, but dont cross function
n: next sentence, but jump over function call
finish: finish current function
q: quit
r: run the programe until it wait for some input or over
bt: breakpoint set
followed by some function or
condition
ex: bt if * != 0 etc.
disable breakpoint: disable breakpoint
i: info
followed by : i break: show all the breaks set
: locals
show all temp var value
f: frame
show the stack layer: ex: f1
p: print
show the value you want to see when programe stop
ex: p *a@10 : print what pointer a point to and list the 10 value in sequence
display:
display the value every time it is used
undisplay:
cancel the display followed by display seq ex: 0, 1
watch:
keep an eye on the value once it change print it.
x :
print content in bytes since certain position, treat it all as byte.
ex: x/7b input, b for bytes
汇编级调试:
disassemble:show the current disassemble code
si:step by assmble instruction