[lldb-dev] RTTI does not work stable in LLDB.

Roman Popov via lldb-dev lldb-dev at lists.llvm.org
Mon Feb 6 17:58:38 PST 2017


Hello,
I just found out that sometimes I don't get correct dynamic type in LLDB
even if I compile with g++.  How can I get typeinfo/vtable dump from LLDB
to check if it is still the same name matching issue?

2017-02-06 17:04 GMT-08:00 Robinson, Paul via lldb-dev <
lldb-dev at lists.llvm.org>:

> Yes, I do get that it was just unfortunate timing.  Sorry for failing at
> being light-hearted.
>
>
>
> I suspect the compiler can be persuaded to emit a name consistent with the
> demangling of the vtable name.  Despite being the way-things-have-worked
> for a long time, it still seems moderately fragile, especially in the face
> of various compiler-list debates about what the name actually should
> contain.
>
> --paulr
>
>
>
> *From:* Greg Clayton [mailto:gclayton at apple.com]
> *Sent:* Monday, February 06, 2017 4:38 PM
> *To:* Robinson, Paul
> *Cc:* Zachary Turner; LLDB Dev (lldb-dev at lists.llvm.org)
> *Subject:* Re: [lldb-dev] RTTI does not work stable in LLDB.
>
>
>
>
>
> On Feb 6, 2017, at 3:38 PM, Robinson, Paul <paul.robinson at sony.com> wrote:
>
>
>
> It's not practical for the DWARF to try to identify the actual address of
> the vtable; that address might not be available.
>
> it seems like we could hang onto the linkage_name of the vtable though,
> somewhere, so you wouldn't be relying on the demangler you have available
> at runtime to produce the same string that the compiler did at compile
> time.  The symbolic name of the vtable should be unambiguous (one hopes!)
> but not depend on the existence of the vtable in any particular place.
>
> Doesn't solve the problem for today's compilers, granted.
>
> --paulr
>
>
>
> P.S. It would be helpful to have these things come up *before* the next
> rev of the spec is frozen.  Just sayin'.  J
>
>
>
>
>
> We had just identified this today and realized it was a problem so we had
> no idea there was a problem until today. Debuggers have been doing this
> pretty reliably for the past 15 years, so it was never anything we actually
> needed extra support for since it was so easy to do.
>
>
>
> Greg
>
>
>
>
>
>
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170206/6a493a88/attachment.html>


More information about the lldb-dev mailing list