@@ -137,20 +137,19 @@ static void EventThreadFunction(DAP &dap) {
137137 lldb::SBBreakpoint::GetBreakpointEventTypeFromEvent (event);
138138 auto bp = Breakpoint (
139139 dap, lldb::SBBreakpoint::GetBreakpointFromEvent (event));
140- // If the breakpoint was originated from DAP, it will have the
141- // BreakpointBase::GetBreakpointLabel() label attached . Regardless
140+ // If the breakpoint was set through DAP, it will have the
141+ // BreakpointBase::GetBreakpointLabel() label. Regardless
142142 // of whether locations were added, removed, or resolved, the
143143 // breakpoint isn't going away and the reason is always "changed".
144- if (bp.MatchesName (BreakpointBase::GetBreakpointLabel ()) &&
145- (event_type & lldb::eBreakpointEventTypeLocationsAdded ||
144+ if ((event_type & lldb::eBreakpointEventTypeLocationsAdded ||
146145 event_type & lldb::eBreakpointEventTypeLocationsRemoved ||
147- event_type & lldb::eBreakpointEventTypeLocationsResolved)) {
146+ event_type & lldb::eBreakpointEventTypeLocationsResolved) &&
147+ bp.MatchesName (BreakpointBase::GetBreakpointLabel ())) {
148148 // As the DAP client already knows the path of this breakpoint, we
149149 // don't need to send it back as part of the "changed" event. This
150- // prevent us from sending paths that should be source
151- // mapped. Note that CreateBreakpoint doesn't apply source mapping
152- // and certain implementation ignore the source part of this event
153- // anyway.
150+ // avoids sending paths that should be source mapped. Note that
151+ // CreateBreakpoint doesn't apply source mapping and certain
152+ // implementation ignore the source part of this event anyway.
154153 llvm::json::Value source_bp = CreateBreakpoint (&bp);
155154 source_bp.getAsObject ()->erase (" source" );
156155
0 commit comments