When I step into this line in cgdb
if (cfgFile.good()) //Settings:cpp:31
std::cout << "File load succeeded" << std::endl; //Settings:cpp:32
I get this error
(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.
Aparrently it doesn't see my system header files after specifying them in cgdb using
dir -isystem path/to/gcc/system/headers
According to the error its looking for basic_ios.h at
/build/gcc/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h
But that directory doesn't exist in my file system, but I do indeed have that file at these directories
/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
How can I get cgdb to step through the system header files as well. Do I have to do something in my cmake file ? I do have my program built with the debug flag, so what's wrong ?
libstdc++? your debugger had tried to step though (probably debug version of) libstdc++, which as compiling time, was located overtherestepaccidentally. I was concerned with whether this was the intended behavior for it to not be able to find the STL headers, or my configuration was wrong or something. So your saying that this is normal ? I just found it weird that you can step through C++'s standard library code in a IDE, but with cgdb the files don't seem to exist...