[Lldb-commits] [PATCH] D61908: DWARF: Add ability to reference debug info coming from multiple sections
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 14 08:41:04 PDT 2019
labath created this revision.
labath added reviewers: JDevlieghere, clayborg, aprantl.
Herald added a subscriber: arphaman.
This patch adds the ability to precisely address debug info in
situations when a single file can have more than one debug-info-bearing
sections (as is the case with type units in DWARF v4).
The changes here can be classified into roughly three categories:
- the code which addresses a debug info by offset gets an additional argument, which specifies the section one should look into.
- the DIERef class also gets an additional member variable specifying the section. This way, code dealing with DIERefs can know which section is the object referring to.
- the user_id_t encoding steals one bit from the dwarf_id field to store the section. This means the total number of separate object files (apple .o, or normal .dwo) is limited to 2 billion, but that is fine as it's not possible to hit that number without switching to DWARF64 anyway.
This patch is functionally equivalent to (and inspired by) the two
patches (D61503 <https://reviews.llvm.org/D61503> and D61504 <https://reviews.llvm.org/D61504>) by Jan Kratochvil, but there are differences
in the implementation:
- it uses an enum instead of a bool flag to differentiate the sections
- it increases the size of DIERef struct instead of reducing the amount of addressable debug info
- it sets up DWARFDebugInfo to store the units in a single vector instead of two. This sets us up for the future in which type units can also live in the debug_info section, and I believe it's cleaner because there's no need for unit index remapping
There are no tests with this patch as this is essentially NFC until
we start parsing type units from the debug_types section.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 16714 bytes
Desc: not available
More information about the lldb-commits