There is a package called libstdc++6-8-dbg
on Ubuntu Linux (latest version at time of writing).
It is described as:
GNU Standard C++ Library v3 (debugging files) This package contains the shared library of libstdc++ compiled with debugging symbols.
Among other things it contains these files:
/usr/lib/x86_64-linux-gnu/debug/libstdc++.a/usr/lib/x86_64-linux-gnu/debug/libstdc++.so.6.0.25/usr/lib/x86_64-linux-gnu/debug/libstdc++fs.a
Normally to compile a (single translation unit) C++ program with gcc you can write:
$ g++ myprogram.cc
To add generation of debug symbols of user code you pass -g
:
$ g++ -g myprogram.cc
But this doesn't include the debug versions of the standard library.
What extra options do you need to pass to g++
to tell it to use the debug versions of the standard library provided by libstdc++6-8-dbg
?