[Lldb-commits] [lldb] [LLDB] Add module hook implementation (PR #185465)

via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 8 18:25:19 PDT 2026


================
@@ -0,0 +1,54 @@
+//===-- ScriptedHookPythonInterface.h ---------------------------*- C++ -*-===//
+//
+// 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_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDHOOKPYTHONINTERFACE_H
+#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDHOOKPYTHONINTERFACE_H
+
+#include "lldb/Interpreter/Interfaces/ScriptedHookInterface.h"
+
+#include "ScriptedPythonInterface.h"
+
+namespace lldb_private {
+class ScriptedHookPythonInterface : public ScriptedHookInterface,
+                                    public ScriptedPythonInterface,
+                                    public PluginInterface {
+public:
+  ScriptedHookPythonInterface(ScriptInterpreterPythonImpl &interpreter);
+
+  llvm::Expected<StructuredData::GenericSP>
+  CreatePluginObject(llvm::StringRef class_name, lldb::TargetSP target_sp,
+                     const StructuredDataImpl &args_sp) override;
+
+  /// A hook class must implement at least one callback. All three are
+  /// individually optional; hooks that implement none will be rejected
+  /// at creation time.
----------------
jimingham wrote:

You documented this correctly, but it doesn't look like you implemented your documentation.

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


More information about the lldb-commits mailing list