GDB throws error on Arch Linux

I've filled a bug report against this issue: https://bugs.archlinux.org/task/47220

This happens because the ostream source file cannot be found.

Workaround 1

You can strip the libstdc++ library:

sudo strip /usr/lib/libstdc++.so.6

And then gdb will not try to open the source file and the error will not appear anymore.

You can switch back to the unstripped version by reinstalling it with:

sudo pacman -S gcc-libs

Workaround 2

You can add a substitution rule in gdb:

gdb tst
(gdb) set substitute-path /build/gcc/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include /usr/include/c++/5.2.0

Tags:

Gdb

Arch Linux