I am a noob learning c++ and using gdb for debugging.
In a Makefile, I compile my individual objs using:
g++ -Wall -g -O0 -c foo.cc
g++ -Wall -g -O0 -c bar.cc
...
then compile the entire executable using:
g++ -Wall -g -O0 foo.o bar.o -lncursesw
Then I use gdb to step
through my code. It keeps stepping into the standard lib so I followed this script recommendation to skip over absolute file names that are prefixed with /usr/include/c++/*
.
Now my issue
gdb tries to list files that are not on my machine. If from inside gdb (after start
command) I execute info sources
, there are a bunch of files that are prefixed with /build/gcc/*
which are not on my machine. Why did GDB try to access them?
When stepping through, I cannot skip over the files since gdb will tell me "No such file or directory"
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.