/// <summary> /// Handle a breakpoint stop event. /// </summary> DebugEvent HandleBreakpointStop(RemoteThread thread) { uint stopReasonDataCount = thread.GetStopReasonDataCount(); List <IDebugBoundBreakpoint2> boundBreakpoints = new List <IDebugBoundBreakpoint2>(); for (uint i = 0; i < stopReasonDataCount; i += 2) { int pendingId = (int)thread.GetStopReasonDataAtIndex(i); int boundId = (int)thread.GetStopReasonDataAtIndex(i + 1); if (!_lldbBreakpointManager.GetPendingBreakpointById( pendingId,out IPendingBreakpoint pendingBreakpoint)) { Trace.WriteLine($"Warning: Missing pending breakpoint with ID {pendingId}"); continue; } if (!pendingBreakpoint.GetBoundBreakpointById(boundId, out IBoundBreakpoint boundBreakpoint)) { Trace.WriteLine( $"Warning: Missing bound breakpoint with ID {pendingId}.{boundId}"); continue; } boundBreakpoint.OnHit(); boundBreakpoints.Add(boundBreakpoint); } if (boundBreakpoints.Count <= 0) { return(null); } return(new BreakpointEvent( _boundBreakpointEnumFactory.Create(boundBreakpoints.ToArray()))); }
public int EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 boundBreakpointsEnum) { if (_newlyBoundBreakpoints != null && _breakpointBoundEnumFactory != null) { boundBreakpointsEnum = _breakpointBoundEnumFactory.Create(_newlyBoundBreakpoints); } else { _pendingBreakpoint.EnumBoundBreakpoints(out boundBreakpointsEnum); } return(VSConstants.S_OK); }
public int EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 boundBreakpointsEnum) { boundBreakpointsEnum = null; if (_deleted) { return(AD7Constants.E_BP_DELETED); } IBoundBreakpoint[] boundBreakpoints = _boundBreakpoints.Values.ToArray(); boundBreakpointsEnum = _breakpointBoundEnumFactory.Create(boundBreakpoints); return(VSConstants.S_OK); }
public int EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 enumBoundBreakpoints) { IDebugBoundBreakpoint2[] boundBreakpoints = { Self }; enumBoundBreakpoints = _boundBreakpointEnumFactory.Create(boundBreakpoints); return(VSConstants.S_OK); }