<div dir="ltr"><span style="font-size:12.8000001907349px">> I'd like to add that simply installing libstdc++-dbg will not solve this problem currently as lldb has troubles loading symbols from splitdebug files (I am working on this currently, <</span><a href="http://reviews.llvm.org/D7913" target="_blank" style="font-size:12.8000001907349px">http://reviews.llvm.org/D7913</a><span style="font-size:12.8000001907349px">> should help, but apparently is not sufficient).</span><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I couldn't get it working this way either.  Thanks for looking into this Pavel!</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">> OTOH, adding -fstandalone-debug to C(XX)FLAGS does make the problem go away, and it could be something we might want to enable by default in test cases (to reduce dependencies on the test environment). </span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">In most cases, I strongly prefer easy-of-use to completely optimal.  Even if we fix splitdebug files, there is still the possibility of someone not having debug symbols readily available or third party libraries without symbols that we would like to support.  I recommend that we follow OSX and FreeBSD and enable </span><span style="font-size:12.8000001907349px">-fstandalone-debug by default on Linux and Android.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">People who really know what they're doing can experiment with the </span><span style="font-size:12.8000001907349px">-fno-standalone-debug and use it if it works for them.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thoughts?</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Vince</span></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 27, 2015 at 6:12 AM, Pavel Labath <span dir="ltr"><<a href="mailto:labath@google.com" target="_blank">labath@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><br><div class="gmail_quote">On 26 February 2015 at 21:34, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>On Wed, Feb 25, 2015 at 10:31 PM, Vince Harron <span dir="ltr"><<a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi David,<div><br></div><div>There are some LLDB tests that have been failing against clang-3.6 for a long time and just started failing in clang-3.5 when my Ubuntu distro updated clang-3.5.</div><div><br></div><div>I tracked it back to a clang CL that you submitted nearly a year ago.</div><div><br></div><div>This test passes when compiling with gcc 4.8.2 and clang-3.5 before this CL.  I'm very new to the project and I don't really understand what's going on here.  Any guidance you can offer would be very much appreciated.</div></div></blockquote></span><div><br>Short answer is that you're probably missing the debug build of your standard library (libstdc++-XXX-dbg).<br><br>Long answer: Compilers (both GCC & Clang) try to optimize debug info size by relying on the existence of debug info (especially for types) in other files. They use various signals to make this assumption - both Clang and GCC use vtables as one signal (if a type is dynamic, only emit the debug info for the definition of the type wherever the vtable is emitted). Beyond that, Clang also uses explicit template instantiation declarations as a signal as well (if there's an explicit template instantiation declaration, only emit the full definition of the type where the explicit instantiation definition is).<br><br>This allows the compilers to omit definitions in many cases, in favor of them being emitted in one or a small handful of places, reducing debug info size and linker input size.<br><br>In the case of std::basic_string<char>, libstdc++ (& other standard library implementations, I'd imagine) has an explicit instantiation declaration to avoid the compiler having to do all the work of instantiating basic_string<char> in every translation unit. The explicit instantiation definition is in the standard library objects (static or dynamic) and that's where the debug info for the type is. If you don't install the debug build of your standard library, you won't have the debug info definition of std::basic_string<char>.<br><br>Hope that helps,<br></div></blockquote></div><br></span>I'd like to add that simply installing libstdc++-dbg will not solve this problem currently as lldb has troubles loading symbols from splitdebug files (I am working on this currently, <<a href="http://reviews.llvm.org/D7913" target="_blank">http://reviews.llvm.org/D7913</a>> should help, but apparently is not sufficient). OTOH, adding -fstandalone-debug to C(XX)FLAGS does make the problem go away, and it could be something we might want to enable by default in test cases (to reduce dependencies on the test environment). We could then probably disable it when testing splitdebug handling specifically.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra">pl</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><br><table cellspacing="0" cellpadding="0" style="font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Vince Harron |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Technical Lead Manager |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 858-442-0868</td></tr></tbody></table><br></div></div>
</div>