单步执行源文件时cgdb没有看到basic_ios.h标头

时间:2016-11-11 15:45:21

标签: c++ linux debugging gcc cgdb

当我进入cgdb

中的这一行时
if (cfgFile.good()) //Settings:cpp:31
 std::cout << "File load succeeded" << std::endl; //Settings:cpp:32


我收到此错误

(gdb) run 
The program being debugged has been started already.
Start it from the beginning? (y or n) y
The program being debugged has been started already.
Starting program: /home/sk33z0/Documents/PROGRAMMING/PROJECTS/C++/WORLD_LEGENDS/WORLDLEGENDS 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Breakpoint 1, Settings::load (this=0xbfffef24) at /home/sk33z0/Documents/PROGRAMMING/PROJECTS/C++/WORLD_LEGENDS/src/Settings.cpp:31
(gdb) step
std::basic_ios<char, std::char_traits<char> >::good (this=0xbfffefb8) at /build/gcc/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:181
181     /build/gcc/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h: No such file or directory.



在使用

在cgdb中指定系统头文件后,它几乎看不到我的系统头文件

dir -isystem path/to/gcc/system/headers

根据错误,它在

寻找basic_ios.h
/build/gcc/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h


但是我的文件系统中没有该目录,但我确实在这些目录中有该文件

  

/usr/include/c++/6.2.1/bits/basic_ios.h

     

/usr/lib/gcc/i686-pc-linux-gnu/5.4.0/include/c++/bits/basic_ios.h

如何让cgdb逐步浏览系统头文件。我必须在我的cmake文件中做些什么吗?我的程序是用调试标志构建的,所以有什么不对?

0 个答案:

没有答案