llvm-project/lldb
Pavel Labath f3fab392f5 [lldb/DWARF] Don't get confused by line sequences with tombstone values
Summary:
With D81784, lld has started debug info resolving relocations to
garbage-collected symbols as -1 (instead of relocation addend). For an
unaware consumer this generated sequences which seemingly wrap the
address space -- their first entry was 0xfffff, but all other entries
were low numbers.

Lldb stores line sequences concatenated into one large vector, sorted by
the first entry, and searched with std::lower_bound. This resulted in
the low-value entries being placed at the end of the vector, which
utterly confused the lower_bound algorithm, and caused it to not find a
match. (Previously, these sequences would be at the start of the vector,
and normally would contain addresses that are far smaller than any real
address we want to look up, so std::lower_bound was fine.)

This patch makes lldb ignore these kinds of sequences completely. It
does that by changing the construction algorithm from iterating over the
rows (as parsed by llvm), to iterating over the sequences. This is
important because the llvm parsed performs validity checks when
constructing the sequence array, whereas the row array contains raw
data.

Reviewers: JDevlieghere, MaskRay

Differential Revision: https://reviews.llvm.org/D83957
2020-07-17 11:51:52 +02:00
..
bindings [lldb/api] Improve error reporting in SBBreakpoint::AddName (NFCI) 2020-07-01 12:45:05 +02:00
cmake [lldb/Lua] Require Lua 5.3 2020-06-23 09:24:01 -07:00
docs Updated the list of supported platforms in LLDB to include Apple silicon. 2020-07-08 15:33:00 -07:00
examples Harmonize Python shebang 2020-07-16 21:53:45 +02:00
include/lldb [lldb] Store StackFrameRecognizers in the target instead of a global list 2020-07-17 09:26:27 +02:00
packages/Python [lldb/Test] Remove custom tearDownHooks from GDB Remote tests 2020-07-15 13:18:06 -07:00
resources
scripts Harmonize Python shebang 2020-07-16 21:53:45 +02:00
source [lldb/DWARF] Don't get confused by line sequences with tombstone values 2020-07-17 11:51:52 +02:00
test [lldb/DWARF] Don't get confused by line sequences with tombstone values 2020-07-17 11:51:52 +02:00
third_party/Python/module Harmonize Python shebang 2020-07-16 21:53:45 +02:00
tools [intel-pt] Fix building due to CMake + python changes 2020-07-16 12:18:59 -07:00
unittests [lldb] Store StackFrameRecognizers in the target instead of a global list 2020-07-17 09:26:27 +02:00
utils [lldb/Test] Fix missing yaml2obj in Xcode standalone build. 2020-07-10 21:34:56 -07:00
.clang-format
.clang-tidy [lldb] Add .clang-tidy with customization to disable readability-identifier-naming 2020-03-09 12:50:28 -07:00
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt [lldb/CMake] Only CMAKE_CFG_INTDIR if it's not '.' 2020-03-27 17:49:00 -07:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT
use_lldb_suite_root.py