gdb 小备注

http://zhiwei.li/text/tag/gdb/page/2/

http://blog.csdn.net/haoel/article/details/2879 

 

1.       想查看造成corequery,但是默认print字符串的长度是200,可以set print elements 0,即可完整print全部字符串.

2.       Gdb的时候想要看到想要的代码,但是一个一个的通过directory添加太麻烦了,可以一次性在gdb开始的时候将全部源码路径添加进去,即可自由查看.举例如下:

gdb `find isearch_cn_4_2_1.trunk -type d -printf '-d %p '`  is_searcher_server is_searcher_server.core.asc-offer-search-13-03.20121124001151 

 

 

另外一种方法是,

1.info source 查看Compilation directory

2.set substitute-path xxxx yyyyy

将程序编译路径xxx 替换为当前代码路径

posted on 2012-11-27 13:49  阿笨猫  阅读(489)  评论(0编辑  收藏  举报