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

Greg Clayton via lldb-dev lldb-dev at lists.llvm.org
Thu Sep 24 14:34:39 PDT 2015


> On Sep 23, 2015, at 6:39 PM, dawn at burble.org wrote:
> 
> 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?  

I only want to add options if we have a split community on what the right thing to do is. I believe we should be able to come up with a solution that makes sense that everyone will like. You might check the SVN history on the line to see if that sheds any light on the issue. So lets first try to fix it correctly so everyone is happy without adding an option.

>> 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.
> 
> Thanks!
> -Dawn



More information about the lldb-dev mailing list