This patch replaces .handleAppleNames() with .handleAccelTables().
This way, any accelerator tables will be verified (if it exists).
Details
Diff Detail
Event Timeline
include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | ||
---|---|---|
52 ↗ | (On Diff #108148) | I'm not sure this needs to be part of the interface — and if it is this should be a static constant or a constexpr instead of a data member. |
include/llvm/DebugInfo/DWARF/DWARFVerifier.h | ||
191 | ... existing *Apple-style* accelerator tables ... | |
lib/DebugInfo/DWARF/DWARFContext.cpp | ||
430 | Could you just update all of the other cases in a separate commit? | |
lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
477 | "Section" << Sectionname << " is too small to fit a section header\n" | |
481 | why initialize to 8? | |
483 | "Section" << Sectionname << " is smaller than size described in section header\n" | |
579 | add one :-) | |
589 | if (!D.getAppleNamesSection().Data.empty()) | |
592 | ... |
Addressed reviewer's comments.
include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | ||
---|---|---|
52 ↗ | (On Diff #108148) | Removed it. I can use getSizeHdr() instead. |
lib/DebugInfo/DWARF/DWARFContext.cpp | ||
430 | Yes, I'll do that. | |
lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
481 | I thought I need to verify whether num_of_buckets > 0 (and that field would be at offset 8 from the beginning of the section). I modified the code to perform only extract() for the second check. |
lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
---|---|---|
567 | One last thing: You should not need to hard-code the name here. Can you extract it from the Section datastructure instead? |
lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
---|---|---|
567 | I'm not sure how to do this. Even dumpAccelSection() in DWARFContext.cpp is being called with the name of the section as an argument. |
... existing *Apple-style* accelerator tables ...
DWARF v5 accelerator tables are not yet supported.