[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
Wed May 27 03:54:14 PDT 2026


================
@@ -120,6 +120,47 @@ In any case, if we want the normal detach behavior we will just send:
 D
 ```
 
+## jAcceleratorPluginInitialize
+
+This packet requests initialization data from all accelerator plugins
+installed in lldb-server. Accelerator plugins allow lldb-server to support
+debugging of hardware accelerators (e.g. GPUs, FPGAs) alongside the native
+host process. This packet is only sent when the server reports the
+`accelerator-plugins+` feature in its `qSupported` response.
+
+```
+LLDB SENDS:    jAcceleratorPluginInitialize
+STUB REPLIES:  [<accelerator_action>,...]
+```
+
+Each `accelerator_action` is a JSON object with the following required fields:
+
+| Key            | Type    | Description |
+|----------------|---------|-------------|
+| `plugin_name`  | string  | Unique name identifying the accelerator plugin (e.g. `"mock"`, `"amdgpu"`). Each installed plugin has a distinct name. |
+| `session_name` | string  | Name for the DAP debug session associated with this plugin. May be empty. |
+| `identifier`   | integer | Unique identifier for this action. Each action from a given plugin has a distinct identifier. |
----------------
DavidSpickett wrote:

Please make it more obvious how this nests. I think you mean that when I want to run an action I provide plugin name + identifier. So identifiers are unique within that plugin's "namespace".

> Each action from a given plugin has a distinct identifier.

Doesn't definitively say whether they're globally unique or per plugin. At least when I read it it doesn't.

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


More information about the lldb-commits mailing list