protected Ad7EnumDebugErrorBreakpoints(Ad7EnumDebugErrorBreakpoints enumerator) { Debug.WriteLine("Ad7EnumDebugErrorBreakpoints: ctor clone"); IEnumDebugErrorBreakpoints2 e = (IEnumDebugErrorBreakpoints2)enumerator; e.Reset(); _errors = new List<IDebugErrorBreakpoint2>(); uint cnt; e.GetCount(out cnt); for (int i = 0; i < cnt; i++) { IDebugErrorBreakpoint2[] err = new IDebugErrorBreakpoint2[ 1 ]; uint fetched = 1; e.Next(1, err, ref fetched); _errors.Add(err[0]); } }
int IEnumDebugErrorBreakpoints2.Next( uint celt, IDebugErrorBreakpoint2[] rgelt, ref uint pceltFetched) { Debug.WriteLine("Ad7EnumDebugErrorBreakpoints: Next"); if (celt == 0) return VSConstants.E_UNEXPECTED; int inext = 0; int max = Math.Min((int)celt + _next, this._errors.Count); while (inext + _next < max) { rgelt[inext] = _errors[ ( int )inext]; inext++; } pceltFetched = (uint)(max - _next); _next += inext; return VSConstants.S_OK; }
public void BindNoSourceLine() { var mockDocumentPosition = Substitute.For <IDebugDocumentPosition2>(); string value; mockDocumentPosition.GetFileName(out value).Returns(x => { x[0] = TEST_FILE_NAME; return(0); }); mockDocumentPosition.GetRange(Arg.Any <TEXT_POSITION[]>(), null).Returns( VSConstants.E_FAIL); mockMarshal.GetDocumentPositionFromIntPtr(Arg.Any <IntPtr>()).Returns( mockDocumentPosition); var result = pendingBreakpoint.Bind(); IDebugErrorBreakpoint2 breakpointError = GetBreakpointError(); Assert.That(GetBreakpointErrorMessage(breakpointError), Does.Contain("line number")); mockBreakpointManager.Received().ReportBreakpointError( Arg.Any <DebugBreakpointError>()); Assert.AreEqual(VSConstants.S_FALSE, result); }
public int GetErrorBreakpoint(out IDebugErrorBreakpoint2 ppErrorBP) { ppErrorBP = _error; return Constants.S_OK; }
int IDebugBreakpointErrorEvent2.GetErrorBreakpoint(out IDebugErrorBreakpoint2 ppErrorBP) { ppErrorBP = this; return VSConstants.S_OK; }
public int GetErrorBreakpoint(out IDebugErrorBreakpoint2 ppErrorBP) { ppErrorBP = _breakpoint; return VSConstants.S_OK; }
public DebugBreakpointErrorEvent(enum_EVENTATTRIBUTES attributes, IDebugErrorBreakpoint2 breakpoint) : base(attributes) { Contract.Requires<ArgumentNullException>(breakpoint != null, "breakpoint"); _breakpoint = breakpoint; }
public DebugBreakpointErrorEvent(IDebugErrorBreakpoint2 error) { _error = error; }
int IDebugPendingBreakpoint2.Bind() { Debug.WriteLine("AD7Breakpoint: Bind"); enumError = null; // set breakpoint line int result = FindBreakpointLine(); if (result != VSConstants.S_OK) return result; if (((IDebugPendingBreakpoint2)this).CanBind(out enumError) == VSConstants.S_OK) { // bind breakpoint DebuggerManager.Instance.BindBreakpoint(this); _callback.Breakpoint(_node, this); return VSConstants.S_OK; } else { IDebugErrorBreakpoint2[] err = new IDebugErrorBreakpoint2[ 1 ]; uint cnt = 0; enumError.Reset(); enumError.Next(1, err, ref cnt); enumError.Reset(); _callback.BreakpointError(_node, err[0]); return VSConstants.S_OK; } }
int IDebugBreakpointErrorEvent2.GetErrorBreakpoint (out IDebugErrorBreakpoint2 ppErrorBP) { LoggingUtils.PrintFunction (); ppErrorBP = m_errorBreakpoint; return Constants.S_OK; }
public BreakpointError (IDebugErrorBreakpoint2 errorBreakpoint) { m_errorBreakpoint = errorBreakpoint; }
public void BreakpointError(AD7ProgramNode program, IDebugErrorBreakpoint2 bpError) { Debug.WriteLine("Event BreakpointError"); Guid iid = new Guid(DebugBreakpointErrorEvent.IID); _callback.Event(_engine, null, null, null, new DebugBreakpointErrorEvent(bpError), ref iid, DebugBreakpointErrorEvent.Attributes); }
public DebugBreakpointErrorEvent(IDebugErrorBreakpoint2 error) { _error = error; }
public Event(IDebugErrorBreakpoint2 errorBreakpoint) { m_errorBreakpoint = errorBreakpoint; }
internal void Add(IDebugErrorBreakpoint2 error) { Debug.WriteLine("Ad7EnumDebugErrorBreakpoints: Add"); _errors.Add(error); }
internal void Add(IDebugErrorBreakpoint2 error) { Debug.WriteLine("Ad7EnumDebugErrorBreakpoints: Add"); _errors.Add(error); }
public int GetErrorBreakpoint(out IDebugErrorBreakpoint2 breakpointError) { breakpointError = _breakpointError; return(VSConstants.S_OK); }
public int GetErrorBreakpoint(out IDebugErrorBreakpoint2 ppErrorBP) { ppErrorBP = _error; return(Constants.S_OK); }
// Token: 0x0600009C RID: 156 RVA: 0x0000392C File Offset: 0x00001B2C public int GetErrorBreakpoint(out IDebugErrorBreakpoint2 error) { error = this.errorBreakpoint; return(0); }
// Enumerates all error breakpoints that resulted from this pending breakpoint. int IDebugPendingBreakpoint2.EnumErrorBreakpoints(enum_BP_ERROR_TYPE bpErrorType, out IEnumDebugErrorBreakpoints2 ppEnum) { // Called when a pending breakpoint could not be bound. This may occur for many reasons such as an invalid location, an invalid expression, etc... // The sample engine does not support this, but a real world engine will want to send an instance of IDebugBreakpointErrorEvent2 to the // UI and return a valid enumeration of IDebugErrorBreakpoint2 from IDebugPendingBreakpoint2::EnumErrorBreakpoints. The debugger will then // display information about why the breakpoint did not bind to the user. if ((_BPError != null) && ((bpErrorType & enum_BP_ERROR_TYPE.BPET_TYPE_ERROR) != 0)) { IDebugErrorBreakpoint2[] errlist = new IDebugErrorBreakpoint2[1]; errlist[0] = _BPError; ppEnum = new AD7ErrorBreakpointsEnum(errlist); return Constants.S_OK; } else { ppEnum = null; return Constants.S_FALSE; } }
int IDebugBreakpointErrorEvent2.GetErrorBreakpoint(out IDebugErrorBreakpoint2 ppErrorBP) { ppErrorBP = this; return(VSConstants.S_OK); }