[Lldb-commits] [lldb] Add a breakpoint override resolver feature to lldb (PR #195392)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Wed May 6 13:56:19 PDT 2026


================
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// 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/Breakpoint/ScriptedBreakpointOverrideResolver.h"
+#include "lldb/Breakpoint/Breakpoint.h"
+#include "lldb/Breakpoint/BreakpointResolverScripted.h"
+
+namespace lldb_private {
+lldb::BreakpointResolverSP ScriptedBreakpointResolverOverride::CheckForOverride(
+    Target &target, lldb::BreakpointResolverSP initial_sp) {
+  lldb::BreakpointResolverSP candidate_sp(new BreakpointResolverScripted(
+      {}, m_class_name, initial_sp->GetDepth(), m_args_data));
+  if (candidate_sp->OverridesResolver(target, initial_sp))
+    return candidate_sp;
+  return {};
+}
+
+llvm::Error ScriptedBreakpointResolverOverride::Validate() {
+  // FIXME: we should make sure the module and class exist, though that will
+  // to happen in a scripting language specific function.
----------------
medismailben wrote:

I think you're missing a word here. Also can this be implemented now ?

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


More information about the lldb-commits mailing list