[llvm-dev] [cfe-dev] Emiting linkage names for Types to Debuginfo (C++ RTTI support in GDB/LLDB)

Roman Popov via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 2 18:12:20 PST 2018


Mangled names can be long indeed, but pretty-printed types are also long. I
can evaluate effect on size on clang codebase itself.

If you disable RTTI, than obviously you can't use it. So if RTTI is
disabled, we can disable mangled names in DWARF. Clang is compiled without
standard C++ RTTI because it has it's own RTTI. In general, however, many
libraries use standard RTTI.



2018-03-02 17:43 GMT-08:00 <paul.robinson at sony.com>:

> > 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.
> >
> > I've asked about the problem on G++ maillist, and one of the proposed
> > solutions is to emit DW_AT_linkage_name for types.
> >
> > Can this solution be also implemented in LLVM?
>
> It could, but mangled names can be very long and we need to consider
> whether the additional size cost is worth it under various conditions.
> For example, does this type matching work when a program is compiled
> with `-fno-rtti`?  (Clang itself is compiled this way by default.)
> Thanks,
> --paulr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180302/ef5a1d7b/attachment.html>


More information about the llvm-dev mailing list