I'm new to programming in c++ and learning to debug using GDB, so my apologies if the issue is obvious. But I've been struggling for a few days and decided to get some help.

I compile my code using the following flags

Code:
 g++ -Wall -g -O0 -lncursesw foo.cc bar.cc
Then I step through my code in gdb and keep stepping to the standard library. I do not want to do this so I
I edited my .gdbinit file to script and skip all files under /usr/include/c++/*. This works well.

GBD also says directories /build/gcc/* are sources. I can check this from inside gdb with
the info sources command.

/build/gcc/*, let alone /build/ directories on my machine do not even exist. Why are they appearing as sources?

Even GDB is telling me "No such file or directory" when I step.

Code:
std::basic_ifstream<wchar_t, std::char_traits<wchar_t> >::basic_ifstream (this=0x7fffffffc680, __in_chrg=<optimized out>,
__vtt_parm=<optimized out>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/fstream:518

/build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/fstream: No such file or directory.