Fix the representation of debug line table in DebugInfo LLVM library,
authorAlexey Samsonov <samsonov@google.com>
Tue, 7 Aug 2012 11:46:57 +0000 (11:46 +0000)
committerAlexey Samsonov <samsonov@google.com>
Tue, 7 Aug 2012 11:46:57 +0000 (11:46 +0000)
commit351f83be64057380877615153fe5dc50308ab017
tree64f4a82adea27798422027ccf6f6fa6ad5a35b10
parentb6fdd022b7414f916ba7b08560a0f55e14863326
Fix the representation of debug line table in DebugInfo LLVM library,
and "instruction address -> file/line" lookup.

Instead of plain collection of rows, debug line table for compilation unit is now
treated as the number of row ranges, describing sequences (series of contiguous machine
instructions). The sequences are not always listed in the order of increasing
address, so previously used std::lower_bound() sometimes produced wrong results.
Now the instruction address lookup consists of two stages: finding the correct
sequence, and searching for address in range of rows for this sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161414 91177308-0d34-0410-b5e6-96231b3b80d8
lib/DebugInfo/DWARFContext.cpp
lib/DebugInfo/DWARFDebugLine.cpp
lib/DebugInfo/DWARFDebugLine.h
test/DebugInfo/Inputs/dwarfdump-test4.elf-x86-64 [new file with mode: 0755]
test/DebugInfo/dwarfdump-test.test