[lldb-dev] lldb fails to hit breakpoint when line maps to multiple addresses

via lldb-dev lldb-dev at lists.llvm.org
Wed Sep 23 18:39:13 PDT 2015

On Wed, Sep 23, 2015 at 11:44:41AM -0700, Greg Clayton wrote:
> We currently coalesce breakpoints to avoid the user stopping multiple times on the same source line. This might have been done to avoid stepping issues we might have had in the past, but we have made many modifications to stepping such that the step thread plans now know how to step through two hits from the same source line. I would need Jim to confirm this, but he is out for 2 weeks.

I (think I) understand the intent, but it is wrong as written.  What I
think the code is trying to do is remove duplicate lines within a basic
block (or at least that's the only explanation I can come up with that
makes any sense), but the code appears to assume Block == basic block,
which is not true. 

As long as there is branching into/out of an address range, you can miss
breakpoints, which is much worse than stepping to the same line twice,
wouldn't you agree?  Note that this isn't even in optimized code - this
issue will be far more common after the optimizer has played with it.
As you say, we might have to wait for Jim to hear the real answer. 
If this turns out to be intentional, OK to add an option to control it?  

> So this is on purpose and is expected. Not sure what will happen if we disable this coalescing of locations that are contiguous. Feel free to try and disable it and run the test suite and see how things go. Don't check anything in, but you could try disabling it on your branch and see how things go. Then when Jim returns we can confirm with him what the right thing to do is.

Sure - will do.


More information about the lldb-dev mailing list