diff options
author | Pavel Labath <pavel@labath.sk> | 2019-05-16 11:07:58 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2019-05-16 11:07:58 +0000 |
commit | f4014e116ed85ba7f82bf7cac52f0541684023bd (patch) | |
tree | 7e35407ed65946735b8900310a42505495b6c8f0 /llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp | |
parent | 472c6ef8b0f53061b049039f9775ab127beafbe4 (diff) | |
download | llvm-f4014e116ed85ba7f82bf7cac52f0541684023bd.zip llvm-f4014e116ed85ba7f82bf7cac52f0541684023bd.tar.gz llvm-f4014e116ed85ba7f82bf7cac52f0541684023bd.tar.bz2 |
DWARF: Add ability to reference debug info coming from multiple sections
Summary:
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 and 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.
Reviewers: JDevlieghere, clayborg, aprantl
Subscribers: arphaman, jankratochvil, lldb-commits
Differential Revision: https://reviews.llvm.org/D61908
llvm-svn: 360872
Diffstat (limited to 'llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions