[all-commits] [llvm/llvm-project] 0f7cfb: [lldb/DWARF] Don't index dwp file multiple times
Pavel Labath via All-commits
all-commits at lists.llvm.org
Sun Feb 23 23:51:28 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0f7cfb25432e405aeb12251598a9798662979ced
https://github.com/llvm/llvm-project/commit/0f7cfb25432e405aeb12251598a9798662979ced
Author: Pavel Labath <pavel at labath.sk>
Date: 2020-02-24 (Mon, 24 Feb 2020)
Changed paths:
M lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
M lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
M lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
M lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
M lldb/test/Shell/SymbolFile/DWARF/dwp-debug-types.s
Log Message:
-----------
[lldb/DWARF] Don't index dwp file multiple times
Summary:
When we added support for type units in dwo files, we changed the
"manual" dwarf index to index _all_ dwarf units in the dwo file instead
of just the split unit belonging to our skeleton unit. This was fine for
dwo files, as they contain only a single compile units and type units do
not have a split type unit which would point to them.
However, this does not work for dwp files because, these files do
contain multiple split compile units, and the current approach means
that each unit gets indexed multiple times (once for each split unit =>
n^2 complexity).
This patch teaches the manual dwarf index to treat dwp files specially.
Any type units in the dwp file added to the main list of compile units
and indexed with them in a single batch. Split compile units in dwp
files are still indexed as a part of their skeleton unit -- this is done
because we need the DW_AT_language attribute from the skeleton unit to
index them properly.
Handling of dwo files remains unchanged -- all units (type and skeleton)
are indexed when we reach the dwo file through the split unit.
Reviewers: clayborg, JDevlieghere, aprantl
Subscribers: arphaman, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74964
More information about the All-commits
mailing list