Esempio n. 1
0
		/// <summary>
		/// Creates a debug event breakpoint
		/// </summary>
		/// <param name="eventKind">Debug event</param>
		/// <param name="cond">Condition</param>
		/// <returns></returns>
		public DnDebugEventBreakpoint CreateBreakpoint(DebugEventBreakpointKind eventKind, Func<DebugEventBreakpointConditionContext, bool> cond) {
			DebugVerifyThread();
			var bp = new DnDebugEventBreakpoint(eventKind, cond);
			debugEventBreakpointList.Add(bp);
			return bp;
		}
Esempio n. 2
0
		void CreateStartupDebugBreakEvent(DebugEventBreakpointKind evt, Func<DebugEventBreakpointConditionContext, bool> cond = null) {
			Debug.Assert(debugger.ProcessState == DebuggerProcessState.Starting);
			DnDebugEventBreakpoint bp = null;
			bp = debugger.CreateBreakpoint(evt, ctx => {
				if (cond == null || cond(ctx)) {
					debugger.RemoveBreakpoint(bp);
					return true;
				}
				return false;
			});
		}
		internal DnDebugEventBreakpoint(DebugEventBreakpointKind eventKind, Func<DebugEventBreakpointConditionContext, bool> cond) {
			EventKind = eventKind;
			Condition = cond ?? defaultCond;
		}