Cherrypick lldb-mcp improvements - #13565
Merged
JDevlieghere merged 4 commits intoAug 2, 2026
Merged
Conversation
JDevlieghere
commented
Jul 29, 2026
| PR | Title |
|---|---|
| #212681 | [lldb-mcp] Run managed debug sessions synchronously |
| #212680 | [lldb-mcp] Add --help and --version |
| #212678 | [lldb] Reply to malformed requests and use JSON-RPC error codes |
lldb-mcp accepted no arguments at all, so --help and --version fell through to the protocol loop and blocked reading stdin, and a mistyped flag was silently ignored while the tool waited for MCP traffic. Handle both flags and reject anything else with a usage message. (cherry picked from commit f958a55)
…#212678) The transport dropped a message that failed to parse: it logged the error and returned, so a peer waiting on that request hung forever and every message already buffered behind it was discarded. Keep going after a failed parse, and add ReplyWithParseError so a message that is valid JSON but not a valid request is answered against its own id. Unparseable JSON still gets no reply, since it carries no id and JSON-RPC forbids inventing one. Method-not-found was raised with createStringError, which converts through inconvertibleErrorCode() to -32603, so clients could not tell a misspelled method from a server fault. Use the MethodNotFound error, which already carries -32601, and give InvalidParams the -32602 code it was missing. (cherry picked from commit 16f116f)
A debugger created for an MCP session has no event loop to service asynchronous stops, so a resume returned before the process stopped and every subsequent command failed against a still-running process. That made breakpoint debugging unusable: `run` reported only the launch, and `bt` that followed it errored out. Create these debuggers in synchronous mode, as lldb-dap does. (cherry picked from commit 58a93a1)
Author
|
@swift-ci test |
Author
|
@swift-ci test |
Author
|
@swift-ci test Windows |
Author
|
@swift-ci test macOS |
Author
|
Failing to build Foundation? @swift-ci test Windows |
Author
|
@swift-ci test Windows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.