<div dir="ltr">Does it work with gdb? I'm guessing maybe lldb doesn't support the build-id feature that redhat uses ( <a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/developer_guide/intro.debuginfo">https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/developer_guide/intro.debuginfo</a> ) ?<br><br>I'd try gdb + gcc + binutils ld (or gold) + libstdc++ (use std::fstream as an example of something that gcc will home to the libstdc++ debug info - dwarfdump your executable and you'll see it doesn't contain the definition of basic_fstream, but verify the debugger can still render the full definition). If that works, swap out various parts of that & see where it falls apart.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 30, 2019 at 9:50 AM Bob Eastbrook <<a href="mailto:baconeater789@gmail.com">baconeater789@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Jul 25, 2019 at 8:35 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
<br>
> No, it shouldn't - clang attempts to avoid emitting duplicate debug info across the program (it assumes you built the whole program and all libraries with debug info), gcc assumes the same thing though in slightly different/fewer ways.<br>
><br>
> The solution is to install the -dbg build of your libstdc++ package (assuming you're using libstdc++), it will include debug info for the standard library, including std::string.<br>
<br>
Thanks for the pointer.  Based on what you told me, I was able to dig<br>
deeper and found these relevant links:<br>
<br>
<a href="https://bugs.llvm.org/show_bug.cgi?id=24202#c1" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=24202#c1</a><br>
<a href="https://stackoverflow.com/questions/41745527/cannot-view-stdstring-when-compiled-with-clang" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/41745527/cannot-view-stdstring-when-compiled-with-clang</a><br>
<br>
I installed the debug version of libstd++ on my Fedora system with<br>
"dnf debuginfo-install libstdc++" and I now see a debug version of<br>
libstdc++:<br>
<br>
$ file /usr/lib/debug/lib64/libstdc++.so.6.0.26-9.1.1-1.fc30.x86_64.debug<br>
/usr/lib/debug/lib64/libstdc++.so.6.0.26-9.1.1-1.fc30.x86_64.debug:<br>
ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux),<br>
dynamically linked,<br>
BuildID[sha1]=3b2e1aaafd0cb7e1ebd75627d4cde2504c927159, with<br>
debug_info, not stripped<br>
<br>
I don't have things working though.  I still don't see std::string<br>
info when debugging.  My executable is linked against the non-debug<br>
version:<br>
<br>
$ ldd a.out<br>
    linux-vdso.so.1 (0x00007ffec03fe000)<br>
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f2fccd31000)<br>
    libm.so.6 => /lib64/libm.so.6 (0x00007f2fccbeb000)<br>
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2fccbd1000)<br>
    libc.so.6 => /lib64/libc.so.6 (0x00007f2fcca0b000)<br>
    /lib64/ld-linux-x86-64.so.2 (0x00007f2fccf45000)<br>
<br>
Is that my problem?  Or does LLDB somehow know to use the version in<br>
/usr/lib/debug/lib64?<br>
<br>
I'm also puzzled about why the debug version was put in /usr/lib and<br>
not /usr/lib64.<br>
</blockquote></div>