mirror-llvm-project/lldb/source/Protocol
Jonas Devlieghere 16f116f476
[lldb] Reply to malformed requests and use JSON-RPC error codes (#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.
2026-07-29 11:12:30 -07:00
..
MCP [lldb] Reply to malformed requests and use JSON-RPC error codes (#212678) 2026-07-29 11:12:30 -07:00
CMakeLists.txt