我想这可能早些时候被问过,但我找不到满足我要求的那个.
我正在尝试分析各种测试套件中的代码流,从而调试(实际上是试图理解)一个大型项目.但是当我尝试在某些文件中设置断点时,我收到错误"找不到名为filename的源文件".
所以我的问题是:
b filename:*
任何见解都非常受欢迎.
编辑
我用一些hello world代码检查了这些问题,并找到了其中一个答案中指出的相同结果.但我在实际项目中的问题仍然存在.即使我可以看到同一行的编辑输出不被接受为断点,我仍然会得到相同的错误.
编辑2
我得到它的工作,但不明白它是如何以及为什么工作.. ??
(gdb) b /home/neeraj/BTP/trunk/include/header.h:872
No source file named /home/neeraj/BTP/trunk/include/header.h:872
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) b /home/neeraj/BTP/trunk/src/driver.cpp:2
Breakpoint 1 at 0x806c61a: file ../../../trunk/src/driver.cpp, line 2.
(gdb) b /home/neeraj/BTP/trunk/include/header.h:872
Breakpoint 2 at 0x8052fa0: file ../../../trunk/include/header.h:872, line 872.
(gdb)
任何更深入的见解..?