[cfe-users] Should clang++ -g produce debugging info for all types?

Bob Eastbrook via cfe-users cfe-users at lists.llvm.org
Fri Aug 9 18:02:54 PDT 2019


On Mon, Aug 5, 2019 at 1:36 PM David Blaikie <dblaikie at gmail.com> wrote:

> Does it work with gdb?

It works with gdb.  More info:

g++ & gdb -- works, even without debuginfo for libstdc++
clang++ & gdb -- works
g++ & lldb -- works
clang++ & lldb -- fails

I now notice these warnings in lldb after installing the debuginfo packages:

warning: (x86_64) /lib64/libstdc++.so.6 unsupported DW_FORM values:
0x1f20 0x1f21
warning: (x86_64) /lib64/libgcc_s.so.1 unsupported DW_FORM values: 0x1f20 0x1f21

I searched the web for details on that error, but came up empty.
Could it be that the debuginfo packages are just not compatible with
lldb?

> 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.

Good strategy.  I don't quite have the hang of dwarfdump yet though,
but I'll continue to investigate.



More information about the cfe-users mailing list