Skip to content
Commit bf37a037 authored by Pavel Labath's avatar Pavel Labath
Browse files

BreakpointResolverFileLine: Restrict move-to-nearest-code from moving across function boundaries

Summary:
This fixes the case where a user tries to set a breakpoint on a source
line outside of any function (e.g. because that code is #ifdefed out, or
the compiler did not emit code for the function, etc.) and we would
silently move the breakpoint to the next function.

Now we check whether the line range of the resolved symbol context
function matches the original line number. We reject any breakpoint
locations that appear to move the breakpoint into a new function. This
filtering only happens if we have full debug info available (e.g. in
case of -gline-tables-only compilation, we still set the breakpoint on
the nearest source line).

Reviewers: jingham

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D30817

llvm-svn: 297817
parent ae455c56
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment