[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
================
@@ -0,0 +1,53 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_TOOLS_LLDB_SERVER_LLDBSERVERPLUGINREGISTRY_H
+#define LLDB_TOOLS_LLDB_SERVER_LLDBSERVERPLUGINREGISTRY_H
+
+#include "Plugins/Accelerator/LLDBServerPluginAccelerator.h"
+
+namespace lldb_private {
+
+namespace lldb_server {
+
+class LLDBServerPluginRegistry {
----------------
clayborg wrote:
We should mimic what the PluginManager in LLDB does with its plug-ins. Each plug-in can register itself with the manager and they pass a callback function that points to a `LLDBServerPluginAccelerator *<plugin-class>::CreateInstace(...)` callback. Check out `ObjectFileELF` in the `ObjectFileELF::Initialize()` and `ObjectFileELF::Terminate()` functions.
https://github.com/llvm/llvm-project/pull/186535
More information about the lldb-commits
mailing list