[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 27 14:55:44 PDT 2023


jimingham wrote:

This is an oft-requested feature so thanks for doing this!

My only real complaint is that the code that determines the C++ "dynamic type" does much of the work that the ValueObjectVTable has to do to find the vtable pointer, and it's enough code that it seems a shame to have two copies of it.  Maybe there should be a  LanguageRuntime "GetVTablePointer" that factors out the part of GetDynamicTypeAndAddress that finds the VTable.  Then you can get the LanguageRuntime from the Object and call this generic API.  That would also make it clear that this support is for the ItaniamuABI C++ runtime, so that if another runtime comes along that does some other clever thing, it will be straightforward to support it.

https://github.com/llvm/llvm-project/pull/67599


More information about the lldb-commits mailing list