[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


================
@@ -34,6 +34,17 @@ else()
   list(APPEND LLDB_PLUGINS lldbPluginObjectFileELF)
 endif()
 
+option(LLDB_ENABLE_MOCK_ACCELERATOR_PLUGIN
+  "Enable the mock accelerator plugin for testing" OFF)
----------------
DavidSpickett wrote:

I'm not sure how to word this, but there's a part missing from this.

If you enable this, the built lldb-server will contain the mock plugin, right? So it's always going to say "I have an accelerator plugin". Meaning if you actually ship that, you've got 2 extra packets being sent to do nothing.

Unless I have that wrong, and nothing will ever cause the mock plugin to activate, and so there's no overhead in packets sent.

For builds that will also have a real plugin, I assume all it means is the list of plugins is one bigger which is fine, you're querying them anyway and you'll just ignore "mock".

For anyone else, this option's description should note that this is not zero overhead. It does result in more code in the lldb-server binary, however small that is.

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


More information about the lldb-commits mailing list