[Lldb-commits] [lldb] [lldb] Add accelerator plugin connection support (PR #201449)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 17 13:57:39 PDT 2026


================
@@ -4223,6 +4197,61 @@ ProcessGDBRemote::HandleAcceleratorActions(const AcceleratorActions &actions) {
       return error;
   }
 
+  if (actions.connect_info) {
+    if (llvm::Error error = HandleAcceleratorConnection(actions))
+      return error;
+  }
+
+  return llvm::Error::success();
+}
+
+llvm::Error ProcessGDBRemote::HandleAcceleratorConnection(
+    const AcceleratorActions &actions) {
+  const AcceleratorConnectionInfo &connect_info = *actions.connect_info;
+  Debugger &debugger = GetTarget().GetDebugger();
+
+  // Create a new (empty) target for the accelerator and connect to the GDB
+  // server the plugin is serving.
+  llvm::StringRef exe_path =
+      connect_info.exe_path ? *connect_info.exe_path : llvm::StringRef();
+  llvm::StringRef triple =
+      connect_info.triple ? *connect_info.triple : llvm::StringRef();
----------------
clayborg wrote:

same here, maybe change to `std::string`?

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


More information about the lldb-commits mailing list