[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>
Fri, 30 Jul 2021 11:34:51 +0000 (13:34 +0200)
commite7b8ba103a8411fb25237727c3822d4c431e4814
treecf1d698e45039a1d48141c16a06e4f40ed3206dd
parentce52e0339f0ae1e7ac915f041b3f4d32081f648e
[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.

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