gdb的基本用法

1132阅读 0评论2008-02-22 mystérieux
分类:C/C++

# gdb a.out
GNU gdb 6.7.1-debian
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".

(gdb) r
       ---------运行那个可执行文件
(gdb) r  -c data       ---------加参数运行
(gdb) b main   ---------在main处设断点
(gdb) n   ---------继续运行
(gdb) q ---------退出

上一篇:grep 杂记
下一篇:进程的优先级分配:nice, renice