<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 2, 2018 at 3:58 PM, Roman Popov via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</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">Hi all,<div><br></div><div>As you may know modern C++ debuggers (GDB and LLDB) support dynamic type identification for polymorphic objects, by utilizing C++ RTTI.  </div><div>Unfortunately this feature does not work with Clang and GDB >= 7.x .  The last compiler that worked well was G++ 6.x</div><div><br></div><div>I've asked about this issue both on GDB and LLDB maillists. Unfortunately it's hard or impossible to fix it on debugger side.</div></div></blockquote><div><br></div><div>Errr, i posited a solution on the gdb mailing list that i haven't seen shot down so far, that doesn't require linkage names, it only requires one new attribute that is a DW_FORM_ref, and very cheap.</div><div> </div><div>I also wrote the RTTI code for GDB :)<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Currently what debugger has to do is to demangle RTTI name and try to match it to DW_AT_name attribute to find type. As you can see it does not work for any of 3 examples.</div><div><br></div><div>I've asked about the problem on G++ maillist, and one of the proposed solutions is to emit DW_AT_linkage_name for types. </div><div><br></div><div>Can this solution be also implemented in LLVM? </div></div></blockquote><div><br></div><div>Please, no.</div><div><br></div><div>This is completely unneeded and wastes a huge amount of space.</div><div><br></div><div>As you can see from the replies to my solution on the gdb mailing list, it is used by other languages (rust, for example) *anyway*, so we might as well use it for C++ too.</div><div><br></div><div><br></div><div><br></div></div></div></div>