|
LLDB mainline
|
Information about this instance of lldb's MCP server for lldb-mcp to use to coordinate connecting an lldb-mcp client. More...
#include <Server.h>
Static Public Member Functions | |
| static llvm::Expected< ServerInfoHandle > | Write (const ServerInfo &) |
| Writes the server info into a unique file in ~/.lldb. | |
| static llvm::Expected< std::vector< ServerInfo > > | Load () |
| Loads any server info saved in ~/.lldb. | |
| static llvm::Error | Remove (lldb::pid_t pid) |
Removes the registry entry for the instance with the given pid. | |
Public Attributes | |
| std::string | connection_uri |
| lldb::pid_t | pid = LLDB_INVALID_PROCESS_ID |
| Process id of the lldb instance hosting this server, used as its stable identity. | |
Information about this instance of lldb's MCP server for lldb-mcp to use to coordinate connecting an lldb-mcp client.
|
static |
Loads any server info saved in ~/.lldb.
Definition at line 107 of file Server.cpp.
References lldb_private::FileSystem::CreateDataBuffer(), lldb_private::FileSystem::DirBegin(), and lldb_private::FileSystem::Instance().
|
static |
Removes the registry entry for the instance with the given pid.
The handle removes it on a clean exit, so this only prunes one orphaned by a crash.
Definition at line 98 of file Server.cpp.
References lldb_private::FileSpec::GetPath(), GetServerInfoPath(), and pid.
|
static |
Writes the server info into a unique file in ~/.lldb.
Definition at line 69 of file Server.cpp.
References lldb_private::File::eOpenOptionCanCreate, lldb_private::File::eOpenOptionTruncate, lldb_private::File::eOpenOptionWriteOnly, error(), lldb_private::FileSpec::GetPath(), GetServerInfoPath(), lldb_private::FileSystem::Instance(), lldb_private::FileSystem::Open(), pid, and lldb_protocol::mcp::toJSON().
Referenced by lldb_private::mcp::ProtocolServerMCP::Start().
| std::string lldb_protocol::mcp::ServerInfo::connection_uri |
Definition at line 90 of file Server.h.
Referenced by lldb_protocol::mcp::toJSON().
| lldb::pid_t lldb_protocol::mcp::ServerInfo::pid = LLDB_INVALID_PROCESS_ID |
Process id of the lldb instance hosting this server, used as its stable identity.
Definition at line 93 of file Server.h.
Referenced by Remove(), lldb_protocol::mcp::toJSON(), and Write().