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

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu May 1 12:56:01 PDT 2025


JDevlieghere wrote:

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

This is really interesting, thanks for pointing that out @kusmour. While it's true that the single threaded nature of how we handle requests makes it tricky to delay the response, we could delay handling the request altogether until the ConfigurationDone has been sent. For example, with the current queue approach, we could park the launch and attach requests off to the side until the configuration is done. 

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


More information about the lldb-commits mailing list