mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 19:56:05 +00:00

On macOS, breakpoints are briefly unresolved between process launch and when the dynamic loader has informed us about the loaded libraries. This information was being forwarded by lldb-dap, but only partially. In the event handler, we were listening for the `LocationsAdded` and `LocationsRemoved` breakpoint events. For the scenario described above, the latter would trigger and we'd send an event reporting the breakpoint as unresolved. The problem is that when the breakpoint location is resolved again, you receive a `LocationsResolved` event, not a `LocationsAdded` event. As a result, the breakpoint would continue to show up as unresolved in the DAP client. I found a test that tried to test part of this behavior, but the test was broken and disabled. I revived the test and added coverage for the situation described above. Fixes #112629 rdar://137968318