================ @@ -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:
We might also want to add a parameter that specifies if we want to catch inline line entries, or just match line entries for compile units: ``` /// Find all locations for a file and line in this lldb::SBModule lldb::SBSymbolContextList lldb::SBModule::ResolveContexts(lldb::SBFileSpec &file_spec, uint32_t line, bool find_inlines); /// Find all locations for a file and line in all lldb::SBModule in the lldb::SBTarget lldb::SBSymbolContextList lldb::SBTarget::ResolveContexts(lldb::SBFileSpec &file_spec, uint32_t line, bool find_inlines); ``` @JDevlieghere @jimingham let me know what you think of the above APIs? I think it would be very useful to expose the breakpoint location search features as an API. https://github.com/llvm/llvm-project/pull/130503 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits