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

via lldb-dev lldb-dev at lists.llvm.org
Thu Sep 24 18:14:05 PDT 2015


On Thu, Sep 24, 2015 at 02:34:39PM -0700, Greg Clayton wrote:
> 
> 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.

Agreed.

> >> 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.

I ran tests with the code disabled locally on OSX.  When tests are compiled
with clang-602.0.53 (based on llvm 3.6.0svn), we see an additional 34 failures
in the lldb tests, and when tested with clang-503.0.40 (based on llvm 3.4svn),
we see only 6 additional failures.

Most tests are failing because the num_expected_locations is no longer 1.
For that, we could change run_break_set_by_file_and_line to have
num_expected_locations=-1 mean "any number of locations", and if
num_expected_locations == -1, check that the location count is >= 1 (and of
course, fix the affected tests).

Other tests are harder to fix, because they'd need additional "continue"s added
as needed.  But we can't hard-code the number of BP locations in those cases,
as we've already seen differences based on the version of clang, and llvm could
schedule the code differently based on optimizations or platform.  So we'd need
a way to get the number of BP locations and conditionally add "continue"s, but
even that would also be dependant on llvm's codegen.

FYI - the 6 test which fail in both older and newer clangs are:
    CreateAfterAttachTestCase.test_create_after_attach_with_dsym
    CreateAfterAttachTestCase.test_create_after_attach_with_dwarf_and_fork
    CreateAfterAttachTestCase.test_create_after_attach_with_dwarf_and_popen
    ThreadExitTestCase.test_with_dsym
    TypeCompletionTestCase.test_with_dsym_and_run_command
    TypeCompletionTestCase.test_with_dwarf_and_run_command

-Dawn


More information about the lldb-dev mailing list