[Lldb-commits] [lldb] [lldb-server] Add accelerator plugin infrastructure for debugging hardware accelerators like gpus (PR #198907)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue May 26 02:37:08 PDT 2026


================
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Utility/AcceleratorGDBRemotePackets.h"
+
+using namespace lldb_private;
+
+llvm::json::Value lldb_private::toJSON(const AcceleratorActions &data) {
+  return llvm::json::Object{
+      {"plugin_name", data.plugin_name},
+      {"session_name", data.session_name},
----------------
DavidSpickett wrote:

Some things for you to document:
* plugin_name can presumably not be unique sometimes. If I had 2 GPUs there might be 2 NvidiaWhatever plugins, but they will have a different session name or identifier?
* session_name - I wonder about the scoping, is session_name the "outer scope" within which the identifiers live, or are identifiers global so you can just use the identifier to pick out a specific action on a specific accelerator

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


More information about the lldb-commits mailing list