This patch introduces the DWARFUnitHeader class. Its purpose (and its
structure, to the extent it was possible to make it) is the same as its
LLVM counterpart -- to extract the unit header information before we
actually construct the unit, so that we know which kind of units to
construct. This is needed because as of DWARF5, type units live in the
.debug_info section, which means it's not possible to statically
determine the type of units in a given section.
Details
- Reviewers
aprantl clayborg JDevlieghere - Commits
- rZORG04049a08996b: DWARF: Introduce DWARFUnitHeader class
rG04049a08996b: DWARF: Introduce DWARFUnitHeader class
rG03c4bf73eae6: DWARF: Introduce DWARFUnitHeader class
rLLDB361224: DWARF: Introduce DWARFUnitHeader class
rL361224: DWARF: Introduce DWARFUnitHeader class
Diff Detail
- Build Status
Buildable 32085 Build 32084: arc lint + arc unit
Event Timeline
The TypeUnit and CompileUnit classes are pretty much identical now, but that'll change once we start parsing type signatures and cross-referencing them.
Nice! FYI, we have a bot that runs the LLDB dotests against DWARF5 (the last stage http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/) to track the progress.
source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp | ||
---|---|---|
882 | clang-format? |
Are type units still disabled with the kill switch we had in? Or is this on top of the .debug_types patch? We have an internal .debug_types patch we have been using on an older LLVM/Clang/LLDB and we had some major performance issues regarding line tables so I am not sure where we would need to put these fixes (in this patch or in the .debug_types specific patch. This patch seems to enable parsing .debug_types already. The main issue we ran into were:
- only search actual compile unit line tables for breakpoints as many .debug_type units will point to existing line tables from real compile units
- don't add address ranges to type unit DWARFUnits from the line tables
- re-work how support files are parsed by sharing the line tables within a SymbolFileDWARF. .debug_types has type units that reuse line tables from real compile units (thousands of times) and we ended up seeing the same line table being parsed over and over and over. Another way to fix this is to no vend a lldb_private::CompileUnit for any units that aren't really compile units (DW_UT_type and DW_UT_split_type).
So if this patch is enabling all this, we will need to fix this patch to avoid all of the above mentioned issues. Let me know your thoughts.
Cool. That's nice to know. Unfortunately, Green Dragon seems to be in a pretty bad shape (looks like some infrastructure problems), so I can't really see what's the state of things.
This is on top the debug_types patch. However, I decided it makes more sense to do things the other way around, so I'm going to flip their order around. I am going to reply to the rest of your message on the debug_types patch.
clang-format?