I am aware of this question, but it does not appear to work for me.
For the setup, take a simple C++ program, hw.cpp, given by: int main() { }
hw.cpp
int main() { }
Your program gets linked to debug libs.
Only the 'ldd ./hw' is finding the libstdc++ in standard location. For that you need to change LD_LIBRARY_PATH to get the debug shared libraries to load and ldd to find them properly.