[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Mon May 19 09:31:16 PDT 2025
================
@@ -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())
----------------
ashgti wrote:
Should we return an error? Or maybe log that this is invalid?
https://github.com/llvm/llvm-project/pull/139969
More information about the lldb-commits
mailing list