// // 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); }
internal bool IsOwnerOf(ICorDebugBreakpoint breakpoint) { foreach(ICorDebugFunctionBreakpoint corFunBreakpoint in corBreakpoints) { if (((ICorDebugBreakpoint)corFunBreakpoint).Equals(breakpoint)) return true; } return false; }
public BreakpointDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) : base(pAppDomain) { AppDomain = pAppDomain; Thread = pThread; Breakpoint = pBreakpoint; }
// // 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); }
public virtual void Breakpoint( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugBreakpoint breakpoint) { this.DefaultHandler(appDomain); }
public BreakpointSetErrorDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) : base(pAppDomain) { AppDomain = pAppDomain; Thread = pThread; Breakpoint = pBreakpoint; Error = dwError; }
public void Breakpoint( ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { m_listner.PostBreakPoint(new CorThread(pThread)); //controller.Continue(0); }
public bool IsBreakpoint(ICorDebugBreakpoint comBp) { foreach (var bp in rawBps) { if (bp.FunctionBreakpoint.RawObject == comBp) return true; } return false; }
public string GetMethodName(ICorDebugBreakpoint bp) { uint funcToken = GetFunctionToken(bp); BreakpointMethod method; if (!_breakpointsMap.TryGetValue(funcToken, out method)) return string.Empty; return string.Format("{0}.{1}", method.ClassName, method.MethodName); }
internal Breakpoint GetBreakpoint(ICorDebugBreakpoint corBreakpoint) { foreach (Breakpoint breakpoint in this.Breakpoints) { if (breakpoint.IsOwnerOf(corBreakpoint)) { return breakpoint; } } return null; }
public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { var handler = OnBreakpoint; if (handler != null) { handler(this, new DebuggerBreakpointEventArgs(pThread, pBreakpoint)); } pAppDomain.Continue(0); }
internal Breakpoint GetBreakpoint(ICorDebugBreakpoint corBreakpoint) { foreach(Breakpoint breakpoint in breakpointCollection) { if (breakpoint.Equals(corBreakpoint)) { return breakpoint; } } throw new DebuggerException("Breakpoint is not in collection"); }
public void Breakpoint( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugBreakpoint breakpoint) { m_delegate.OnBreakpoint( new BreakpointEventArgs( new DebuggedAppDomain(appDomain), new DebuggedThread(thread), new Breakpoint(breakpoint))); }
public bool IsBreakpoint(ICorDebugBreakpoint comBp) { foreach (var bp in rawBps) { if (bp.FunctionBreakpoint.RawObject == comBp) { return(true); } } return(false); }
void ICorDebugManagedCallback.Breakpoint( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugBreakpoint breakpoint) { if (DebugOutput) { Console.WriteLine("info: Breakpoint"); } appDomain.Continue(0); }
private static uint GetFunctionToken(ICorDebugBreakpoint bp) { var funcBreakpoint = bp as ICorDebugFunctionBreakpoint; if (funcBreakpoint == null) return uint.MaxValue; ICorDebugFunction function; funcBreakpoint.GetFunction(out function); uint funcToken; function.GetToken(out funcToken); return funcToken; }
internal bool IsOwnerOf(ICorDebugBreakpoint breakpoint) { foreach (ICorDebugFunctionBreakpoint corFunBreakpoint in corBreakpoints) { if (((ICorDebugBreakpoint)corFunBreakpoint).Equals(breakpoint)) { return(true); } } return(false); }
internal Breakpoint GetBreakpoint(ICorDebugBreakpoint corBreakpoint) { foreach (Breakpoint breakpoint in this.Breakpoints) { if (breakpoint.IsOwnerOf(corBreakpoint)) { return(breakpoint); } } return(null); }
// Warning! Marshaing of ICorBreakpoint fails in .NET 1.1 public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint corBreakpoint) { EnterCallback(PausedReason.Breakpoint, "Breakpoint", pThread); Breakpoint breakpoint = process.Debugger.Breakpoints[corBreakpoint]; // The event will be risen outside the callback process.BreakpointHitEventQueue.Enqueue(breakpoint); pauseOnNextExit = true; ExitCallback(); }
internal Breakpoint GetBreakpoint(ICorDebugBreakpoint corBreakpoint) { foreach (Breakpoint breakpoint in breakpointCollection) { if (breakpoint.Equals(corBreakpoint)) { return(breakpoint); } } throw new DebuggerException("Breakpoint is not in collection"); }
internal Breakpoint this[ICorDebugBreakpoint corBreakpoint] { get { foreach (Breakpoint breakpoint in this) { if (breakpoint.IsOwnerOf(corBreakpoint)) { return(breakpoint); } } return(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 { m_br = new Breakpoint(a[0]); } 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 void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { throw new NotImplementedException(); }
void ICorDebugManagedCallback.Breakpoint(ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugBreakpoint breakpoint) { HandleEvent(ManagedCallbackType.OnBreakpoint, new CorBreakpointEventArgs(appDomain == null ? null : new CorAppDomain(appDomain), thread == null ? null : new CorThread(thread), breakpoint == null ? null : new CorFunctionBreakpoint((ICorDebugFunctionBreakpoint)breakpoint), ManagedCallbackType.OnBreakpoint )); }
// Warning! Marshaing of ICorBreakpoint fails in .NET 1.1 public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint corBreakpoint) { EnterCallback("Breakpoint", pThread); Breakpoint breakpoint = process.Debugger.GetBreakpoint(corBreakpoint); Thread thread = process.GetThread(pThread); // Could be one of Process.tempBreakpoints // The breakpoint might have just been removed if (breakpoint != null) { RequestPause(thread).BreakpointsHit.Add(breakpoint); } else { RequestPause(thread).Break = true; } ExitCallback(); }
public virtual void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { pAppDomain.Continue(0); }
public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { try { _EnterCallback(); _UpdateActiveThread(pThread); lock (dbgproc) { ICorDebugFunctionBreakpoint iFuncBkpt = pBreakpoint as ICorDebugFunctionBreakpoint; int BkptNum = 0; if (null != iFuncBkpt) { BkptNum = 1 + dbgproc.ibreakpoints.IndexOf(iFuncBkpt); } if (BkptNum < 1) { dbgproc.dout.WriteLine("STOP: Breakpoint Hit"); } else { dbgproc.dout.WriteLine("break at #{0}\t\t", BkptNum); } if (dbgproc.IsStepping) { _ResumeCallback(); return; // Skip _CallbackEvent! } /*ICorDebugFunctionBreakpoint pFuncBreakpoint = pBreakpoint as ICorDebugFunctionBreakpoint; if (null == pFuncBreakpoint) { } else { ICorDebugFunction pFunc; pFuncBreakpoint.GetFunction(out pFunc); ICorDebugCode pCode; pFunc.GetILCode(out pCode); }*/ if (dbgproc.FinishedInitializing) { dbgproc.ShowCurrentLine_unlocked(); } } _CallbackEvent("Breakpoint"); } catch (Exception e) { _CallbackException(e); } }
// Warning! Marshaing of ICorBreakpoint fails in .NET 1.1 public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint corBreakpoint) { EnterCallback("Breakpoint", pThread); Breakpoint breakpoint = process.Debugger.GetBreakpoint(corBreakpoint); Thread thread = process.GetThread(pThread); // Could be one of Process.tempBreakpoints // The breakpoint might have just been removed if (breakpoint != null) { RequestPause(thread).BreakpointsHit.Add(breakpoint); } else { RequestPause(thread).Break = true; } ExitCallback(); }
// Warning! Marshaing of ICorBreakpoint fails in .NET 1.1 public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint corBreakpoint) { EnterCallback("Breakpoint", pThread); Breakpoint breakpoint = process.Debugger.GetBreakpoint(corBreakpoint); // Could be one of Process.tempBreakpoints // The breakpoint might have just been removed if (breakpoint != null) { GetPausedEventArgs().BreakpointsHit.Add(breakpoint); } else { GetPausedEventArgs().Break = true; } pauseOnNextExit = true; ExitCallback(); }
public void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { HandleEvent(pAppDomain); }
public BreakpointSetErrorDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) : base(pAppDomain) { this.AppDomain = pAppDomain; this.Thread = pThread; this.Breakpoint = pBreakpoint; this.Error = dwError; }
public void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { throw new NotImplementedException(); }
internal Breakpoint GetBreakpoint(ICorDebugBreakpoint breakpoint) { return _breakpoints[breakpoint]; }
// Do not pass the pBreakpoint parameter as ICorDebugBreakpoint - marshaling of it fails in .NET 1.1 public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { ManagedCallback managedCallback = GetProcessCallbackInterface("Breakpoint", pAppDomain); if (managedCallback != null) { managedCallback.Breakpoint(pAppDomain, pThread, pBreakpoint); } }
// Do not pass the pBreakpoint parameter as ICorDebugBreakpoint - marshaling of it fails in .NET 1.1 public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { ManagedCallback managedCallback = GetProcessCallbackInterface("Breakpoint", pAppDomain); if (managedCallback != null) { managedCallback.Breakpoint(pAppDomain, pThread, pBreakpoint); } }
public void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { EnterCallback(PausedReason.Other, "BreakpointSetError", pThread); ExitCallback_Continue(); }
public void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { ManagedCallback managedCallback = GetProcessCallbackInterface("BreakpointSetError", pAppDomain); if (managedCallback != null) { managedCallback.BreakpointSetError(pAppDomain, pThread, pBreakpoint, dwError); } }
public void BreakPointCatcher(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { FuntionBreakPoint(new CorThread(pThread)); liveBP = pBreakpoint; }
public BreakpointDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) : base(pAppDomain) { this.AppDomain = pAppDomain; this.Thread = pThread; this.Breakpoint = pBreakpoint; }
public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { Log("Breakpoint hit."); var domain = GetProcessWrapper(pAppDomain).GetAppDomain(pAppDomain); var thread = domain.GetThread(pThread); var breakpoint = domain.GetBreakpoint(pBreakpoint); var eventArgs = new BreakpointEventArgs(domain, thread, breakpoint); domain.DispatchBreakpointEvent(eventArgs); FinalizeEvent(eventArgs); }
protected CorBreakpoint(ICorDebugBreakpoint managedBreakpoint) : base(managedBreakpoint) { Debug.Assert(managedBreakpoint != null); m_corBreakpoint = managedBreakpoint; }
public void Deactivate(ICorDebugBreakpoint bp) { _breakpointsMap.Remove(GetFunctionToken(bp)); bp.Activate(0); }
internal Breakpoint GetBreakpoint(ICorDebugBreakpoint breakpoint) { return(_breakpoints[breakpoint]); }
internal CorBreakpoint(ICorDebugBreakpoint cobreakpoint, CorDebuggerOptions options) : base(cobreakpoint, options) { this.cobreakpoint = cobreakpoint; }
public void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { Logger.WriteLine("Failed to set breakpoing. dwError: {0}", dwError); pAppDomain.Continue(0); }
public DebuggerBreakpointEventArgs(ICorDebugThread thread, ICorDebugBreakpoint breakpoint) : base(thread) { _breakpoint = breakpoint; }
public void BreakpointSetError(ICorDebugAppDomain appDomain, ICorDebugThread thd, ICorDebugBreakpoint breakPoint, uint xxx) { }
void ICorDebugManagedCallback.BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
public void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { try { _EnterCallback(); _UpdateActiveThread(pThread); _CallbackNotImplemented(); _CallbackEvent("BreakpointSetError", true); } catch (Exception e) { _CallbackException(e); } }
public virtual void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { pAppDomain.Continue(0); }
void ICorDebugManagedCallback.Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint) { var ev = new CorBreakpointEventArgs(new CorAppDomain(pAppDomain, p_options), new CorThread(pThread, p_options), new CorFunctionBreakpoint((ICorDebugFunctionBreakpoint)pBreakpoint, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
protected CorBreakpoint(ICorDebugBreakpoint managedBreakpoint) : base(managedBreakpoint) { Debug.Assert(managedBreakpoint!=null); m_corBreakpoint = managedBreakpoint; }
// Warning! Marshaing of ICorBreakpoint fails in .NET 1.1 public void Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint corBreakpoint) { EnterCallback(PausedReason.Breakpoint, "Breakpoint", pThread); Breakpoint breakpoint = process.Debugger.Breakpoints[corBreakpoint]; // The event will be risen outside the callback process.BreakpointHitEventQueue.Enqueue(breakpoint); pauseOnNextExit = true; ExitCallback(); }
public void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { EnterCallback(PausedReason.Other, "BreakpointSetError", pThread); ExitCallback(); }
public void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { EnterCallback("BreakpointSetError", pThread); ExitCallback(); }
public void BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { ManagedCallback managedCallback = GetProcessCallbackInterface(pAppDomain); if (managedCallback != null) { managedCallback.BreakpointSetError(pAppDomain, pThread, pBreakpoint, dwError); } }
void ICorDebugManagedCallback.BreakpointSetError( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugBreakpoint breakpoint, UInt32 errorCode) { HandleEvent(ManagedCallbackType.OnBreakpointSetError, new CorBreakpointSetErrorEventArgs(appDomain == null ? null : new CorAppDomain(appDomain), thread == null ? null : new CorThread(thread), null, (int)errorCode, ManagedCallbackType.OnBreakpointSetError)); }
internal Breakpoint(ICorDebugBreakpoint comBreakpoint) { _comBreakpoint = comBreakpoint; }