[lldb] [DWARF-5] Be lazier about loading .dwo files
authorEric Leese <leese@google.com>
Fri, 30 Jul 2021 11:08:00 +0000 (13:08 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 31 Jul 2021 08:45:31 +0000 (10:45 +0200)
commitfb09f365ae28920666ddfd466fb09b44b9cb7be1
treedd3553d6af183fd326afdf27651e112c795aedaf
parent18ec93d9e60c687bfb2b39269f7f81d47b71a179
[lldb] [DWARF-5] Be lazier about loading .dwo files

This change makes sure that DwarfUnit does not load a .dwo file until
necessary. I also take advantage of DWARF 5's guarantee that the first
support file is also the primary file to make it possible to create
a compile unit without loading the .dwo file.

Testcases now require Linux as it is needed for -gsplit-dwarf.

Review By: jankratochvil, dblaikie

Differential Revision: https://reviews.llvm.org/D100299
lldb/include/lldb/Symbol/CompileUnit.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/source/Symbol/CompileUnit.cpp
lldb/test/Shell/SymbolFile/DWARF/dwarf5-lazy-dwo.c [new file with mode: 0644]
lldb/test/Shell/SymbolFile/DWARF/lit.local.cfg
lldb/test/Shell/SymbolFile/DWARF/split-optimized.c [new file with mode: 0644]
lldb/test/Shell/SymbolFile/DWARF/x86/dwp.s