gdb

1682阅读 0评论2010-05-11 pppStar
分类:LINUX

板子上
gdbsever :10000 ./app
主机上
xxx-gdb ./app
target remote ip:10000

调试core文件
mv core.6235 core
chmod +x core
xxx-gdb -c core ./app
 
产生core 文件
ulimit -c 查看限制
ulimit -c unlimited  接触限制
ulimit -c unlimited  (只对当前shell进程有效)
或在~/.bashrc 的最后加入: ulimit -c unlimited (一劳永逸)
 
gdb常用命令
print 打印变量
b 打断点,函数、文件、条件等
b function if xxx=1
c继续运行
bt显示调用栈
上一篇:Debian下为本机编译内核模块的方法
下一篇:mount