[Lldb-commits] [lldb] [LLDB][Accelerators][1/M] Scaffold a basic Mock plugin for testing accelerator flows (PR #186535)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 20 14:00:09 PDT 2026


================
@@ -440,12 +448,23 @@ int main_gdbserver(int argc, char *argv[]) {
   }
   if (Inputs.empty() && connection_fd == SharedSocket::kInvalidFD) {
     WithColor::error() << "no connection arguments\n" << HelpText;
-    return EXIT_FAILURE;
+    return 1;
   }
 
   NativeProcessManager manager(mainloop);
   GDBRemoteCommunicationServerLLGS gdb_server(mainloop, manager);
 
+  // Create and activate all accelerator plugins.
+  auto accelerator_plugins =
+      LLDBServerPluginRegistry::Instance().TryInstantiateAllAcceleratorPlugins(
+          gdb_server, mainloop);
+
----------------
clayborg wrote:

This assumes all plug-ins will use the same `mainloop` and `manager`.  This isn't how we are doing it right now in the llvm-server-plugins branch. Each one has the option to use their own. The main issue with using the same mainloop and manager is one debug session can stop another from getting packets. The AMD plug-in we have re-uses one of the mainloop or manager, but we don't expect all plug-ins to have this restriction.

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


More information about the lldb-commits mailing list