// // IEnumerator interface // public bool MoveNext() { ICorDebugBreakpoint[] a = new ICorDebugBreakpoint[1]; uint c = 0; int r = m_enum.Next((uint)a.Length, a, out c); if (r == 0 && c == 1) // S_OK && we got 1 new element { ICorDebugBreakpoint br = a[0]; if (br is ICorDebugFunctionBreakpoint) { m_br = new CorFunctionBreakpoint((ICorDebugFunctionBreakpoint)br); } else if (br is ICorDebugModuleBreakpoint) { m_br = new CorModuleBreakpoint((ICorDebugModuleBreakpoint)br); } else if (br is ICorDebugValueBreakpoint) { m_br = new CorValueBreakpoint((ICorDebugValueBreakpoint)m_br); } else { throw new NotSupportedException("unexpected breakpoint type"); } } else { m_br = null; } return(m_br != null); }
// // IEnumerator interface // public bool MoveNext() { ICorDebugBreakpoint[] a = new ICorDebugBreakpoint[1]; uint c = 0; int r = m_enum.Next((uint)a.Length, a, out c); if (r == 0 && c == 1) // S_OK && we got 1 new element { ICorDebugBreakpoint br = a[0]; throw new NotImplementedException(); /* * if(a is ICorDebugFunctionBreakpoint) * m_br = new CorFunctionBreakpoint((ICorDebugFunctionBreakpoint)br); * else if( a is ICorDebugModuleBreakpoint) * m_br = new CorModuleBreakpoint((ICorDebugModuleBreakpoint)br); * else if( a is ICorDebugValueBreakpoint) * m_br = new ValueBreakpoint((ICorDebugValueBreakpoint)m_br); * else * Debug.Assert(false); */ } else { m_br = null; } return(m_br != null); }
// // IEnumerator interface // public bool MoveNext() { ICorDebugBreakpoint[] a = new ICorDebugBreakpoint[1]; uint c = 0; int r = m_enum.Next ((uint) a.Length, a, out c); if (r==0 && c==1) // S_OK && we got 1 new element { ICorDebugBreakpoint br = a[0]; if (br is ICorDebugFunctionBreakpoint) m_br = new CorFunctionBreakpoint((ICorDebugFunctionBreakpoint)br); else if (br is ICorDebugModuleBreakpoint) m_br = new CorModuleBreakpoint((ICorDebugModuleBreakpoint)br); else if (br is ICorDebugValueBreakpoint) m_br = new CorValueBreakpoint((ICorDebugValueBreakpoint)m_br); else throw new NotSupportedException("unexpected breakpoint type"); } else m_br = null; return m_br != null; }
// // IEnumerator interface // public bool MoveNext () { ICorDebugBreakpoint[] a = new ICorDebugBreakpoint[1]; uint c = 0; int r = m_enum.Next ((uint) a.Length, a, out c); if (r==0 && c==1) // S_OK && we got 1 new element { ICorDebugBreakpoint br = a[0]; throw new NotImplementedException(); /* if(a is ICorDebugFunctionBreakpoint) m_br = new CorFunctionBreakpoint((ICorDebugFunctionBreakpoint)br); else if( a is ICorDebugModuleBreakpoint) m_br = new CorModuleBreakpoint((ICorDebugModuleBreakpoint)br); else if( a is ICorDebugValueBreakpoint) m_br = new ValueBreakpoint((ICorDebugValueBreakpoint)m_br); else Debug.Assert(false); */ } else m_br = null; return m_br != null; }
public CorBreakpointEventArgs(CorAppDomain appDomain, CorThread thread, CorBreakpoint managedBreakpoint, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_break = managedBreakpoint; }
public CorBreakpointEventArgs(CorAppDomain appDomain, CorThread thread, CorBreakpoint managedBreakpoint) : base(appDomain, thread) { m_break = managedBreakpoint; }
public CorBreakpointSetErrorEventArgs(CorAppDomain appDomain, CorThread thread, CorBreakpoint breakpoint, int errorCode, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_breakpoint = breakpoint; m_errorCode = errorCode; }
public CorBreakpointSetErrorEventArgs(CorAppDomain appDomain, CorThread thread, CorBreakpoint breakpoint, int errorCode) : base(appDomain, thread) { m_breakpoint = breakpoint; m_errorCode = errorCode; }
/// <summary> /// Locates MDbgBreakpoint object from the CorBreakpoint object. /// </summary> /// <param name="corBreakpoint">breakpoint object from CorXXX layer.</param> /// <returns>MDbgBreakpoint object</returns> /// <remarks> /// returns null if there the breakpoint was not known to the breakpoint /// collection. /// </remarks> public MDbgBreakpoint Lookup(CorBreakpoint corBreakpoint) { foreach (MDbgBreakpoint b in m_items) { foreach (CorBreakpoint cb in b.CorBreakpoints) { if (cb == corBreakpoint) { return b; } } } return null; }
public void Reset() { m_enum.Reset(); m_br = null; }
public void Reset() { m_enum.Reset (); m_br = null; }
/// <summary> /// Register a handler to be invoked when a Custom Breakpoint is hit. /// </summary> /// <param name="breakpoint">The CorBreakpoint to register.</param> /// <param name="handler">The CustomBreakpointEventHandler to run when the Breakpoint is hit. /// If this is null, this breakpoints callback is explicitly deregistered. /// </param> /// <remarks> /// Only one handler can be specified per breakpoint. The handler could be a /// multicast delegate. To change a breakpoints handler, first deregister it and then set /// a new one. /// The handler has the same lifespan semantics as the underlying CorBreakpoint object. /// That means it is alive and the same handler will be invoked every time the breakpoint is hit /// until the handler is explicitly deregistered. /// /// A handler can stop the shell at the breakpoint by calling Controller.Stop on the /// CustomBreakpointEventArgs parameter passed into the delegate. ///</remarks> public void RegisterCustomBreakpoint(CorBreakpoint breakpoint, CustomBreakpointEventHandler handler) { Debug.Assert(breakpoint != null); if (breakpoint == null) throw new ArgumentException("cannot be null", "breakpoint"); if (handler == null) { // explicit deregistration if (customBreakpoints != null) { customBreakpoints.Remove(breakpoint); } } else { // adding registration if (customBreakpoints == null) { customBreakpoints = new ListDictionary(); } else { if (customBreakpoints.Contains(breakpoint)) { throw new InvalidOperationException("Handler alrady registered for the custom breakpoint"); } } customBreakpoints.Add(breakpoint, handler); } }