예제 #1
0
 public EventBreakpoint(Debugger debugger, DebugEventKind eventKind, Func <IEventBreakpoint, IDebugEventContext, bool> cond)
 {
     this.debugger = debugger;
     EventKind     = eventKind;
     this.cond     = cond;
     isEnabled     = true;
 }
예제 #2
0
파일: Debugger.cs 프로젝트: pashav15/pashav
 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);
 });
예제 #3
0
파일: Utils.cs 프로젝트: haise0/reAtomizer
        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));
            }
        }
예제 #4
0
		protected DebugEventContext(Debugger debugger, DebugEventKind eventKind) {
			this.debugger = debugger;
			this.eventKind = eventKind;
		}
예제 #5
0
		public EventBreakpoint(Debugger debugger, DebugEventKind eventKind, Func<IEventBreakpoint, IDebugEventContext, bool> cond) {
			this.debugger = debugger;
			this.eventKind = eventKind;
			this.cond = cond;
			this.isEnabled = true;
		}
예제 #6
0
 protected DebugEventContext(Debugger debugger, DebugEventKind eventKind)
 {
     this.debugger  = debugger;
     this.eventKind = eventKind;
 }
예제 #7
0
		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;
		});