Issue with incomplete type debug info in recent release_35


disclaimer/ Apologies if this is the wrong llvm/clang mailing list; please, direct me to the right one if needed. /disclaimer

I’ve been experiencing issues with incomplete type info when debugging code generated by clang 3.5.0 from the recent release_35 branch.

Generally, the problem manifests itself as the inability to examine any std::string parameter to a function, in either gdb or lldb:

(lldb) p arg_string
(std::string) $4 = error: summary string parsing error

(gdb) p arg_string
$2 = (const std::string &) @0x7fffffffd948:

This is observed on two separate amd64 machines under Ubuntu 12.04, with both the nightly build packages from the llvm-toolchain-precise-3.5 repo ( and when built locally from svn branch release_35. It bears noting that on the same machines an older, locally-built version of pre-3.5.0 (trunk circa rev 198K) does not exhibit the problem.

Is that a known regression, or shall I try to file a ticket for it?

Martin Krastev

Do you have the -dbg package of your standard library installed? Try
installing that and see if it resolves the issue.

There are some improvements to debug info size that rely on the whole
project (and library dependencies) being built with debug info enabled (GCC
does similar optimizations, FWIW - though not the one that's firing on
std::string specifically). Or if you'd just rather turn off the
optimization, pass -fstandalone-debug.

If neither of those things work - please file a bug with a reduced test
case, etc.

(for the record, the specific commit that likely caused the change in
behavior you're observing is (though we
implemented the optimization GCC already implemented a few months before
that - which applies to types with vtables, like standard iostreams))

Hi David,

Passing -fstandalone-debug solved the issue. Thanks!


Martin Krastev