[lldb/SymbolFile] Don't parse the whole line table for the support files
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 12 Jun 2020 16:30:25 +0000 (09:30 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 12 Jun 2020 16:39:17 +0000 (09:39 -0700)
commit2b34632a5771488ea62a30fdfcfc9d45060a7389
tree2bae05b97ab9f79e8a0a21659c06fa8e3d0ee6cc
parent8dcf89c3a7ce1b250277606321546472387dc9fd
[lldb/SymbolFile] Don't parse the whole line table for the support files

Prior to my patch of using the LLVM line table parsing code,
SymbolFileDWARF::ParseSupportFiles would only parse the line table
prologues to get the file list for any files that could be in the line
table.

With the old behavior, if we found the file that someone is setting the
breakpoint in in the support files list, we would get a valid index. If
we didn't, we would not look any further. So someone sets a breakpoint
one "MyFile.cpp:12" and if we find "MyFile.cpp" in the support file list
for the compile unit, then and only then would we get the entire line
table for that compile unit.

With the current behavior, no matter what, we always fully parse the
line table for all compile units any time any file and line breakpoint
is set. This creates a serious problem when debugging a large DWARF in
.o file project.

This patch re-instates the old behavior. Unfortunately it means we might
end up parsing to prologue twice, but I don't think that outweighs the
cost of trying to cache/reuse it.

Differential revision: https://reviews.llvm.org/D81589
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp