llvm-project
llvm-project copied to clipboard
[lldb-dap] Correctly report breakpoints as resolved on macOS (#129589)
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
(cherry picked from commit d654d37c86a4f0dc99c65cbef0624b5533ed724c)
@swift-ci test
@swift-ci test
@swift-ci test
Our CI is hitting https://github.com/llvm/llvm-project/issues/131242
Closing in favor of https://github.com/swiftlang/llvm-project/pull/10459