Check if debug line sequences are starting after the first code segment
authorAntónio Afonso <antonio.afonso@gmail.com>
Sun, 18 Oct 2020 17:33:25 +0000 (10:33 -0700)
committerAntónio Afonso <antonio.afonso@gmail.com>
Mon, 9 Nov 2020 16:26:00 +0000 (08:26 -0800)
commit265a38fbc547adc0e2b71a98dac4d0a60b0dd63c
tree0860758b20d74645e0da56a9fede04bb15ee4aeb
parentd5a465866eea7f1779869c679a4c25ac2cbae59e
Check if debug line sequences are starting after the first code segment

I found a few cases where entries in the debug_line for a specific line of code have invalid entries (the address is outside of a code section or no section at all) and also valid entries. When this happens lldb might not set the breakpoint because the first line entry it will find in the line table might be the invalid one and since it's range is "invalid" no location is resolved. To get around this I changed the way we parse the line sequences to ignore those starting at an address under the first code segment.
Greg suggested to implement it this way so we don't need to check all sections for every line sequence.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D87172
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/test/Shell/SymbolFile/DWARF/line-entries-invalid-addresses.yaml [new file with mode: 0644]