llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[lldb-dap] Correctly report breakpoints as resolved on macOS (#129589)

Open JDevlieghere opened this issue 8 months ago • 4 comments

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)

JDevlieghere avatar Mar 04 '25 01:03 JDevlieghere

@swift-ci test

JDevlieghere avatar Mar 04 '25 01:03 JDevlieghere

@swift-ci test

JDevlieghere avatar Mar 10 '25 22:03 JDevlieghere

@swift-ci test

JDevlieghere avatar Mar 11 '25 19:03 JDevlieghere

Our CI is hitting https://github.com/llvm/llvm-project/issues/131242

JDevlieghere avatar Mar 14 '25 00:03 JDevlieghere

Closing in favor of https://github.com/swiftlang/llvm-project/pull/10459

JDevlieghere avatar Apr 08 '25 21:04 JDevlieghere