[Lldb-commits] [PATCH] D65932: [lldb] Fix dynamic_cast by not treating type info pointers as variables.
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 8 03:54:34 PDT 2019
teemperor added a comment.
The whole information we have "@_ZTI4Base = external constant i8*", that there is no metadata and that we call dynamic_cast on it. I don't see a better way for detecting this than actually checking if we are trying to retrieve RTTI info as a global variable. But I agree that the check itself could be more robust. Looking at the code for the demangler I don't see any good way that fits our use case though (e.g. no `isTypeInfo` or something like that). The only alternative I see for that would be to implement our own mangling detection and then just have a simple check if the mangled name is type information related (e.g. `startswith("_ZTI")` and whatever the MS equivalent its). But that wouldn't be better than what we have now.
CHANGES SINCE LAST ACTION
More information about the lldb-commits