[lldb] Return all line entries matchign a line if no column is specified
authorKim-Anh Tran <kimanh@chromium.org>
Mon, 30 Aug 2021 12:19:34 +0000 (14:19 +0200)
committerKim-Anh Tran <kimanh@chromium.org>
Mon, 30 Aug 2021 12:45:46 +0000 (14:45 +0200)
commit3973d8b29e249a6ea4aceaa4225dfde5663937c6
tree0eef6f3511038e85ccccc4983334f569170d6b73
parent86f5288eae4a27fd2f497ac45ad087d643ad73a8
[lldb] Return all line entries matchign a line if no column is specified

Previously, if no column was specified, ResolveSymbolContext would take
the first match returned by FindLineEntryIndexByFileIndex, and reuse it
to find subsequent exact matches. With the introduction of columns, columns
are now considered when matching the line entries.

This leads to a problem if one wants to get all existing line entries
that match that line, since now the column is also used for the exact match.
This way, all line entries are filtered out that have a different
column number, but the same line number.

This patch changes that by ignoring the column information of the first match
if the original request of ResolveSymbolContext was also ignoring it.

Reviewed By: mib

Differential Revision: https://reviews.llvm.org/D108816
lldb/source/Symbol/CompileUnit.cpp
lldb/unittests/Symbol/TestLineEntry.cpp