hbogert
hbogert

Reputation: 4353

GDB - step in to statically linked libstdc++

For reasons beyond the scope of this question I have to statically link the libstdc++ to my executables. The practical downside is that now GDB can't step in to the stdlib symbols. When I was using the shared linked variants of my executable GDB had no issues to show me the accompanying source files (after I had installed the source package through apt-get under ubuntu which installed it under /build)

How can I step into libstdc++ functions when it is statically linked to an executable in GDB, under Ubuntu (14.04)?

Upvotes: 2

Views: 1092

Answers (1)

Fabio A. Correa
Fabio A. Correa

Reputation: 2036

Ubuntu package libstdc++6-4.8-dbg provides the static library with debug symbols at /usr/lib/x86_64-linux-gnu/debug/libstdc++.a; try building your executable against it and then run gdb.

Upvotes: 1

Related Questions