gdb笔记

(gdb) set $i=0
(gdb) while argv[$i] != 0
>print argv[$i++]
>end

(gdb) x /2cb argv[0]
0xfef82b5e: 47 ‘/’ 114 ‘r’
(gdb) x /2tb argv[0]
0xfef82b5e: 00101111 01110010
(gdb) x /2tw argv[0]
0xfef82b5e: 01101111011011110111001000101111 01101111011101110010111101110100

>silent
>set $p=obj
>while $p != 0
>print $p->name
>set $p=$p->next
>end
>cont (断点不停)

backtrace (bt)
info frame
up
info frame
info locals
frame 0
return 10

call printf(“test\0”)
call fflush(0)

disassemble
watchpoint
display
info display show display

http://www.linuxforum.net/books/LinuxFAQ/program-gdb.html


相关文章

Speak Your Mind

If you want a pic to show with your comment, go get a gravatar!