[Lldb-commits] [PATCH] D101221: [lldb/Symbol] Fix column breakpoint `move_to_nearest_code` match
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 30 15:12:04 PDT 2021
JDevlieghere added inline comments.
================
Comment at: lldb/include/lldb/Symbol/LineTable.h:344
+ template <typename T>
+ uint32_t FindLineEntryIndexByFileIndexImpl(
+ uint32_t start_idx, T file_idx,
----------------
It seems like this method is only using `m_entries`, so I would turn this into a static (non-member) function in the cpp file and pass `m_entries` as an argument.
================
Comment at: lldb/include/lldb/Symbol/LineTable.h:370-372
+ // FIXME: Maybe want to find the line closest before and the line closest
+ // after and
+ // if they're not in the same function, don't return a match.
----------------
nit: reflow
================
Comment at: lldb/include/lldb/Symbol/LineTable.h:377
+ continue;
+ } else if (m_entries[idx].line == line) {
+ ConvertEntryAtIndexToLineEntry(idx, *line_entry_ptr);
----------------
I know you're just moving the code but maybe a good opportunity to simplify the else-after-continue and else-after-return below.
================
Comment at: lldb/source/Breakpoint/BreakpointResolver.cpp:230-234
// If a column was requested, do a more precise match and only
// return the first location that comes after or at the
// requested location.
SourceLoc requested(line, column);
// First, filter out all entries left of the requested column.
----------------
Do these comments need to be updated?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101221/new/
https://reviews.llvm.org/D101221
More information about the lldb-commits
mailing list