[Lldb-commits] [lldb] [LLDB][NativePDB] Set IsDynmaicCXXType metadata for records (PR #155853)

via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 29 11:08:27 PDT 2025


Nerixyz wrote:

> This patch does deviate slightly from how `IsPossibleDynamicType` behaves for DWARF. There we also mark a type dynamic if it has virtual bases (even without any virtual functions). We use this to determine the dynamic type of a derived class, for which the Itanium ABI runtime plugin uses the vtable (which exists for virtual bases too).

I missed that, thank you! On the Microsoft ABI, a type with only virtual bases (no virtual functions) will only have a `vbtable` (offset table for virtual bases). The `vftable` is (if I understand correctly) similar to the vtable on Itanium.

Detecting a class with a vftable is also a bit easier, because the record that describes a class includes a vtable type.

---

For testing, I had to add a binary, since the unit tests can't build. The `yaml2pdb` functionality can't be used, because it's only in `llvm-pdbutil` (not in ObjectYAML). To construct a `UdtRecordCompleter` a `PdbIndex` and the `PdbAstBuilder` is required. And the `PdbAstBuilder` also requires the `SymbolFileNativePDB` to exist. 

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


More information about the lldb-commits mailing list