================ @@ -33,13 +35,42 @@ SourceBreakpoint::SourceBreakpoint(DAP &dap, m_line(breakpoint.line), m_column(breakpoint.column.value_or(LLDB_INVALID_COLUMN_NUMBER)) {} -void SourceBreakpoint::SetBreakpoint(const llvm::StringRef source_path) { +void SourceBreakpoint::SetBreakpoint(const protocol::Source &source) { lldb::SBMutex lock = m_dap.GetAPIMutex(); std::lock_guard<lldb::SBMutex> guard(lock); - lldb::SBFileSpecList module_list; - m_bp = m_dap.target.BreakpointCreateByLocation( - source_path.str().c_str(), m_line, m_column, 0, module_list); + if (m_line == 0) + return; + + if (source.sourceReference) { + // breakpoint set by assembly source. + lldb::SBAddress source_address(*source.sourceReference, m_dap.target); + if (!source_address.IsValid()) ---------------- eronnen wrote:
Good idea, seems that the DAP client should even display an error if we return it as an invalid breakpoint with a message https://github.com/llvm/llvm-project/pull/139969 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits