[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 27 16:57:47 PDT 2025


================
@@ -104,6 +104,43 @@ llvm::Error ProtocolServerMCP::Start(ProtocolServer::Connection connection) {
   if (llvm::Error error = handles.takeError())
     return error;
 
+  auto listening_uris = m_listener->GetListeningConnectionURI();
+  if (listening_uris.empty())
+    return createStringError("Failed to list listening connections");
+  std::string address =
+      llvm::join(m_listener->GetListeningConnectionURI(), ", ");
+
+  llvm::SmallString<128> user_home_dir;
+  FileSystem::Instance().GetHomeDirectory(user_home_dir);
+  FileSpec mcp_registry_dir = FileSpec(user_home_dir.c_str());
+  mcp_registry_dir.AppendPathComponent(".lldb");
----------------
JDevlieghere wrote:

Let's add this to `HostInfo`. Getting the MCP directory might be a bit too specific, but `~/.lldb` seems generally useful. Looks like we have a few more uses of that in `PlatformProperties` for example. 

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


More information about the lldb-commits mailing list