Initial support for parsing vtables out of DWARF information #1174
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I took a stab at adding vtable support to SymtabAPI via the DW_AT_vtable_elem_location attribute in DWARF for #1173 .
This is only a prototype. It parses the attribute and adds vtable information to SymtabAPI internal data structures. I haven't finalized a public interface, nor added tests or documentation.
BUT, I don't think the DW_AT_vtable_elem_location fields are accurate. With GCC compilers, I'm missing information about destructors. With clang compilers, the info is all over the place, with different functions occupying the same slots in the same class's vtable. Based on inspection with dwarfdump, I think this code is reading DW_AT_vtable_elem_location information correctly and it's the compilers that are wrong.
Or, I've got a bug/misunderstanding.
So I'm not immediately sure how to proceed. @woodard , any insight?