This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Return all line entries matchign a line if no column is specified
ClosedPublic

Authored by kimanh on Aug 27 2021, 5:20 AM.

Details

Summary

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.

Diff Detail

Event Timeline

kimanh created this revision.Aug 27 2021, 5:20 AM
kimanh published this revision for review.Aug 27 2021, 5:26 AM
kimanh added reviewers: mib, JDevlieghere.
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2021, 5:27 AM
mib accepted this revision.Aug 27 2021, 8:33 AM

LGTM. Thanks for fixing that.

This revision is now accepted and ready to land.Aug 27 2021, 8:33 AM
This revision was landed with ongoing or failed builds.Aug 30 2021, 5:48 AM
This revision was automatically updated to reflect the committed changes.

Thanks for the review!