I need to debug a custom filebuf
as some tests fail on libc++. I hence compiled and linked my program with -stdlib=libc++ -g
using clang++-9 on Ubuntu and after installing libc++-9-dev
and libc++api-9-dev
.
When I then step into fstream::putback
in GDB I get the error:
std::__1::basic_istream<char, std::__1::char_traits<char> >::putback (this=0x7fffffffd858, __c=101 'e') at ./libcxx/include/istream:1135
1135 ./libcxx/include/istream: File or directory not found.
I'm now confused: Where does this debug information come from? Running the preprocessing only shows, that putback
is in /usr/lib/llvm-9/bin/../include/c++/v1/istream
as confirmed by the verbose compiler output:
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/llvm-9/bin/../include/c++/v1
/usr/local/include
/usr/lib/llvm-9/lib/clang/9.0.1/include
/usr/include/x86_64-linux-gnu
/usr/include
If I check /usr/lib/llvm-9/include/c++/v1/istream
at the mentioned line 1135 it seems it matches.
But how can I tell GDB to use this file and why does it tell me ./libcxx/include/istream
? I haven't found a single directory named libcxx
on my system.