[lldb-dev] Where "thread until <line-number>" should set breakpoints?

Ramana via lldb-dev lldb-dev at lists.llvm.org
Tue Jul 24 21:05:38 PDT 2018

On the subject line, the ToT lldb (see code around
CommandObjectThread.cpp:1230) sets the breakpoint on the first exact
matching line of 'line-number' or the closest line number > 'line-number'
i.e. the best match.

And along with that, starting from the above exact/best matching line
number index in the line table, the breakpoints are also being set on every
other line number available in the line table in the current function
scope. This latter part, I believe, is incorrect.

What, I think, should happen is we just set only one breakpoint on the
first exact/best match for the given 'line-number' and another on the
return address from the current frame. And this leaves us with one special
case where the machine code for one single source line is scattered across
(aka scheduled across) and I do not know what is the expected behaviour in
this case.

If I my above understanding is correct and after discussing here on how to
handle the scattered code scenario, I will submit a patch.

Venkata Ramanaiah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180725/ba68394e/attachment.html>

More information about the lldb-dev mailing list