[Lldb-commits] [lldb] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 26 10:32:04 PDT 2025
================
@@ -0,0 +1,165 @@
+//===-- GoToTargetsRequestHandler.cpp -------------------------------------===//
+//
+// 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 "DAP.h"
+
+#include "JSONUtils.h"
+
+#include <lldb/API/SBBreakpointLocation.h>
+#include <lldb/API/SBListener.h>
+#include <lldb/API/SBStream.h>
+
+namespace lldb_dap {
+
+static llvm::SmallVector<lldb::SBLineEntry>
+GetLineValidEntry(DAP &dap, const lldb::SBFileSpec &file_spec, uint32_t line) {
+ // disable breakpoint listeners so they do not send events to the DAP client.
+ lldb::SBListener listener = dap.debugger.GetListener();
+ lldb::SBBroadcaster broadcaster = dap.target.GetBroadcaster();
+ constexpr auto event_mask = lldb::SBTarget::eBroadcastBitBreakpointChanged;
+ listener.StopListeningForEvents(broadcaster, event_mask);
----------------
clayborg wrote:
Using breakpoints and disabling notifications seems like a bad side affect of using the Breakpoint APIs to work around a missing and needed public API.
https://github.com/llvm/llvm-project/pull/130503
More information about the lldb-commits
mailing list