[Lldb-commits] [PATCH] [IRForTarget] Strenghten handling of alternate mangling.

Siva Chandra sivachandra at google.com
Thu Apr 9 06:36:21 PDT 2015


On Thu, Apr 9, 2015 at 3:03 AM, Zachary Turner <zturner at google.com> wrote:

> By the way, seems this only fixes the case of std::string even though it

>  will continue to exist for any type with an unnamed template parameter..

>  Certainly std::string is the most important example, but I just want to

>  mention that the issue isn't that gcc produces alternate manglings, it's

>  that we build a clang AST out of incomplete DWARF (since gcc doesn't produce

>  complete debug info for unnamed template parameters) and the clang AST

>  resolves to a different mangling.


Agreed. This was a low hanging fruit for me as the "work around" for std::basic_string was already in place. I only made the matching prefix complete.

Even things like invocation of std::map<std::string, int>::size are still broken as clang tries to demangle std::map<std::basic_string<...>, int, ...>::size and since the debug info for some of the template params is missing, it ends up with the uncompressed mangling. A point to note here is that GCC emits the compressed mangled name in the DWARF, but that is not read at all by LLDB. May be we can make clang use that name instead of generating a mangled name itself. Just a may be; I will look into fixing this thoroughly next.


http://reviews.llvm.org/D8846

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list