summaryrefslogtreecommitdiff
path: root/lldb/source/Core/ProtocolServer.cpp
AgeCommit message (Collapse)Author
2025-08-29[lldb] Stop the protocol servers when terminating the plugin (#156101)Jonas Devlieghere
Currently, the server keeps running until we call Stop from its dtor in the static destruction chain. This is too late: the server should stop when the plugin gets terminated.
2025-06-25[lldb] Make MCP server instance global (#145616)Jonas Devlieghere
Rather than having one MCP server per debugger, make the MCP server global and pass a debugger id along with tool invocations that require one. This PR also adds a second tool to list the available debuggers with their targets so the model can decide which debugger instance to use.
2025-06-20[lldb] Add Model Context Protocol (MCP) support to LLDB (#143628)Jonas Devlieghere
This PR adds an MCP (Model Context Protocol ) server to LLDB. For motivation and background, please refer to the corresponding RFC: https://discourse.llvm.org/t/rfc-adding-mcp-support-to-lldb/86798 I implemented this as a new kind of plugin. The idea is that we could support multiple protocol servers (e.g. if we want to support DAP from within LLDB). This also introduces a corresponding top-level command (`protocol-server`) with two subcommands to `start` and `stop` the server. ``` (lldb) protocol-server start MCP tcp://localhost:1234 MCP server started with connection listeners: connection://[::1]:1234, connection://[127.0.0.1]:1234 ``` The MCP sever supports one tool (`lldb_command`) which executes a command, but can easily be extended with more commands.