[Lldb-commits] [lldb] [lldb-dap] Fix raciness in launch and attach tests (PR #137920)

via lldb-commits lldb-commits at lists.llvm.org
Thu May 1 11:35:15 PDT 2025


kusmour wrote:

> Also, the configuration done event can be emitted at any time during initialization. It could even be emitted before the actual launching and attaching happen.

No, this is something we can control. `configurationDone` request will only emit after `initialized` event. And lldb-dap only sends that after launch/attach response. (This is also not complying with the DAP, see below)

> The DAP server can respond to these events asynchronously but today the lldb-dap is single threaded for handling each of these responses.

It's important to point out that in the DAP specification:

> After the response to `configurationDone` is sent, the debug adapter may respond to the `launch` or `attach` request, and then the debug session has started.

Technically the response of launch/attach should be the end of the chain. But because of the single threaded handling we can't do this. I don't think this is impacting the client side (at least for VSCode, it doesn't seem to do anything special upon an launch/attach response). But this suggests that lldb-dap should be able to async handling the requests/events.

https://github.com/llvm/llvm-project/pull/137920


More information about the lldb-commits mailing list