2929namespace lldb_dap {
3030
3131SourceBreakpoint::SourceBreakpoint (DAP &dap,
32- const protocol::SourceBreakpoint &breakpoint,
33- const protocol::Source &source)
32+ const protocol::SourceBreakpoint &breakpoint)
3433 : Breakpoint(dap, breakpoint.condition, breakpoint.hitCondition),
35- m_log_message (breakpoint.logMessage.value_or(" " )), m_source(source),
34+ m_log_message (breakpoint.logMessage.value_or(" " )),
3635 m_line(breakpoint.line),
3736 m_column(breakpoint.column.value_or(LLDB_INVALID_COLUMN_NUMBER)) {}
3837
39- void SourceBreakpoint::SetBreakpoint () {
38+ void SourceBreakpoint::SetBreakpoint (const protocol::Source &source ) {
4039 lldb::SBMutex lock = m_dap.GetAPIMutex ();
4140 std::lock_guard<lldb::SBMutex> guard (lock);
4241
4342 if (m_line == 0 )
4443 return ;
4544
46- if (m_source .sourceReference ) {
45+ if (source .sourceReference ) {
4746 // breakpoint set by assembly source.
48- lldb::SBAddress source_address (*m_source .sourceReference , m_dap.target );
47+ lldb::SBAddress source_address (*source .sourceReference , m_dap.target );
4948 if (!source_address.IsValid ())
5049 return ;
5150
@@ -66,7 +65,7 @@ void SourceBreakpoint::SetBreakpoint() {
6665 m_bp = m_dap.target .BreakpointCreateBySBAddress (address);
6766 } else {
6867 // breakpoint set by a regular source file.
69- const auto source_path = m_source .path .value_or (" " );
68+ const auto source_path = source .path .value_or (" " );
7069 lldb::SBFileSpecList module_list;
7170 m_bp = m_dap.target .BreakpointCreateByLocation (source_path.c_str (), m_line,
7271 m_column, 0 , module_list);
0 commit comments