public EventBreakpoint(Debugger debugger, DebugEventKind eventKind, Func <IEventBreakpoint, IDebugEventContext, bool> cond) { this.debugger = debugger; EventKind = eventKind; this.cond = cond; isEnabled = true; }
public IEventBreakpoint CreateBreakpoint(DebugEventKind eventKind, Func <IEventBreakpoint, IDebugEventContext, bool> cond) => dispatcher.UI(() => { var bp = new EventBreakpoint(this, eventKind, cond); if (theDebugger.IsDebugging) { Debug.Assert(breakpointsToInitialize.Count == 0); Initialize(bp); } else { breakpointsToInitialize.Add(bp); } return(bp); });
public static DBG.DebugEventBreakpointKind ToDebugEventBreakpointKind(this DebugEventKind eventKind) { switch (eventKind) { case DebugEventKind.CreateProcess: return(DBG.DebugEventBreakpointKind.CreateProcess); case DebugEventKind.ExitProcess: return(DBG.DebugEventBreakpointKind.ExitProcess); case DebugEventKind.CreateThread: return(DBG.DebugEventBreakpointKind.CreateThread); case DebugEventKind.ExitThread: return(DBG.DebugEventBreakpointKind.ExitThread); case DebugEventKind.LoadModule: return(DBG.DebugEventBreakpointKind.LoadModule); case DebugEventKind.UnloadModule: return(DBG.DebugEventBreakpointKind.UnloadModule); case DebugEventKind.LoadClass: return(DBG.DebugEventBreakpointKind.LoadClass); case DebugEventKind.UnloadClass: return(DBG.DebugEventBreakpointKind.UnloadClass); case DebugEventKind.LogMessage: return(DBG.DebugEventBreakpointKind.LogMessage); case DebugEventKind.LogSwitch: return(DBG.DebugEventBreakpointKind.LogSwitch); case DebugEventKind.CreateAppDomain: return(DBG.DebugEventBreakpointKind.CreateAppDomain); case DebugEventKind.ExitAppDomain: return(DBG.DebugEventBreakpointKind.ExitAppDomain); case DebugEventKind.LoadAssembly: return(DBG.DebugEventBreakpointKind.LoadAssembly); case DebugEventKind.UnloadAssembly: return(DBG.DebugEventBreakpointKind.UnloadAssembly); case DebugEventKind.ControlCTrap: return(DBG.DebugEventBreakpointKind.ControlCTrap); case DebugEventKind.NameChange: return(DBG.DebugEventBreakpointKind.NameChange); case DebugEventKind.UpdateModuleSymbols: return(DBG.DebugEventBreakpointKind.UpdateModuleSymbols); case DebugEventKind.MDANotification: return(DBG.DebugEventBreakpointKind.MDANotification); case DebugEventKind.CustomNotification: return(DBG.DebugEventBreakpointKind.CustomNotification); default: Debug.Fail("Invalid event kind: " + eventKind); return((DBG.DebugEventBreakpointKind)(-1)); } }
protected DebugEventContext(Debugger debugger, DebugEventKind eventKind) { this.debugger = debugger; this.eventKind = eventKind; }
public EventBreakpoint(Debugger debugger, DebugEventKind eventKind, Func<IEventBreakpoint, IDebugEventContext, bool> cond) { this.debugger = debugger; this.eventKind = eventKind; this.cond = cond; this.isEnabled = true; }
public IEventBreakpoint CreateBreakpoint(DebugEventKind eventKind, Func<IEventBreakpoint, IDebugEventContext, bool> cond) => dispatcher.UI(() => { var bp = new EventBreakpoint(this, eventKind, cond); if (theDebugger.IsDebugging) { Debug.Assert(breakpointsToInitialize.Count == 0); Initialize(bp); } else breakpointsToInitialize.Add(bp); return bp; });