gdb多文件设置断点

来源:互联网 发布:中国网络世界好先进 编辑:程序博客网 时间:2024/06/05 06:21

【原文:http://blog.sina.com.cn/s/blog_5ac88b350100bwst.html】

程序上下文:

可执行程序所在路径:

/data2/……/bin/test

源码所在路径:

/data2/……/src/

当前路径:

/data2/……/bin/test

调试过程:

gdb ./unittest2

错误跨文件设置断点方法:

1. b str_parser.cpp:StrParser::LocalSegment

2. b str_parser.cpp:LocalSegment

3. b str_parser.cpp:StrParser::LocalSegment()

 

正确设置方法:

1. b StrParser::LocalSegment

2. b str_parser.cpp:1361 (StrParser::LocalSegment所在行)


0 0
原创粉丝点击