[Lldb-commits] [PATCH] D53506: [ClangASTContext] Extract VTable pointers from C++ objects
Aleksandr Urakov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 22 09:14:27 PDT 2018
aleksandr.urakov created this revision.
aleksandr.urakov added reviewers: clayborg, labath, granata.enrico.
aleksandr.urakov added a project: LLDB.
Herald added subscribers: lldb-commits, teemperor, abidh.
This patch processes the case of retrieving a virtual base when the object is already read from the debuggee memory.
To achieve that `ValueObject::GetCPPVTableAddress` was removed (btw, it really returned not a C++ VTable address but an object's address, which is a C++ VTable **pointer** address for Itanium, but have nothing to do with VTable address for MSVC) and was reimplemented in `ClangASTContext` (because access to the process is needed to retrieve the VTable pointer in general, and because this is the only place that used old version of `ValueObject::GetCPPVTableAddress`).
This patch allows to use real object's VTable instead of searching virtual bases by offsets restored by `MicrosoftRecordLayoutBuilder`. PDB has no enough info to restore VBase offsets properly, so we have to read real VTable instead.
This patch depends on https://reviews.llvm.org/D53497
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12328 bytes
Desc: not available
More information about the lldb-commits