[cfe-dev] Type suffixes should be generated for non-type template parameters in Debug info.

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Mon Feb 5 13:23:19 PST 2018


On Mon, Feb 5, 2018 at 1:21 PM Roman Popov <ripopov at gmail.com> wrote:

>
>
> 2018-02-05 13:04 GMT-08:00 David Blaikie <dblaikie at gmail.com>:
>
>> Seems fair (though I feel like/wish, perhaps there should be an implicit
>> type parameter in cases like this, but ah well).
>>
>> I still think the idea that DWARF producers should create names that
>> match exactly some specific demangler's pretty printing is problematic...
>> but in this case there's clearly information loss that needs to be
>> addressed.
>>
>
> Can you please elaborate why this is problematic?
>

It's a rather tight coupling - there are many demanglers out there that
might choose different renderings. (eg: "foo<(unsigned)0>" or "foo<0u>" or
"foo<0U>" etc)


>   Also why not to put mangled names into debug_info? Debugger can demangle
> them by itself.
>

There is a way to include mangled names in DWARF (DW_AT_linkage_name) but
that adds some size penalty to the debug info to include that extra
information everywhere.


>
>
> Here is related GDB thread:
> *https://sourceware.org/ml/gdb/2018-02/msg00021.html
> <https://sourceware.org/ml/gdb/2018-02/msg00021.html>*
> According to GDB developer in some cases it is impossible to reconstruct
> type from template parameter tags.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180205/557f29f1/attachment.html>


More information about the cfe-dev mailing list