public override void RemoveEvent(Mono.Debugger.Event ev) { if (!Process.MainThread.IsStopped) { ThrowNotSupported("Breakpoints can't be changed while the process is running."); } Session.DeleteEvent(ev); }
public override void ActivateEvent(Mono.Debugger.Event ev) { if (Process.MainThread.IsStopped) { ev.Activate(Process.MainThread); } else { ThrowNotSupported("Breakpoints can't be changed while the process is running."); } }
public override void EnableEvent(Mono.Debugger.Event ev, bool enable) { if (enable) { ev.Activate(Process.MainThread); } else { ev.Deactivate(Process.MainThread); } }
protected override void Action(ScriptingContext context, Event handle) { handle.IsEnabled = true; }
protected override void Action(ScriptingContext context, Event handle) { context.Interpreter.Session.RemoveEvent (handle); }
protected override void Action(ScriptingContext context, Event handle) { if (handle.IsActivated && handle.NeedsActivation) handle.Deactivate (context.Interpreter.CurrentThread); }
protected override bool DoResolve(ScriptingContext context) { if (Args == null || Args.Count == 0) return true; int id; try { id = (int) UInt32.Parse (Argument); } catch { context.Print ("event number expected."); return false; } handle = context.Interpreter.GetEvent (id); return handle != null; }
protected abstract void Action(ScriptingContext context, Event handle);
public bool ActivateOrDeactivateEventAsync(Event handle, bool activate) { lock (this) { if (!handle.NeedsActivation || (activate == handle.IsActivated)) return false; var action = activate ? BreakpointHandle.Action.Insert : BreakpointHandle.Action.Remove; Breakpoint breakpoint = (Breakpoint) handle; if (pending_bpts.ContainsKey (breakpoint)) pending_bpts [breakpoint] = action; else pending_bpts.Add (breakpoint, action); return true; } }
public virtual void RemoveEvent(MDB.Event ev) { }
public virtual void ActivateEvent(MDB.Event ev) { }
public virtual void EnableEvent(MDB.Event ev, bool enable) { }
public void RemoveEvent(Event handle) { lock (this) { var cp = handle as ExceptionCatchPoint; if (cp != null) { exception_catchpoints.Remove (cp.UniqueID); events.Remove (cp.Index); return; } Breakpoint breakpoint = (Breakpoint) handle; breakpoint.IsEnabled = false; events.Remove (breakpoint.Index); if (pending_bpts.ContainsKey (breakpoint)) pending_bpts.Remove (breakpoint); if (reached_main) pending_bpts.Add (breakpoint, BreakpointHandle.Action.Remove); } }
public void DeleteEvent(Event handle) { RemoveEvent (handle); }
public void DeactivateEventAsync(Event handle) { ActivateOrDeactivateEventAsync (handle, false); }
public void AddEvent(Event handle) { lock (this) { var cp = handle as ExceptionCatchPoint; if (cp != null) { exception_catchpoints.Add (cp.UniqueID, cp); events.Add (cp.Index, cp); return; } Breakpoint breakpoint = (Breakpoint) handle; events.Add (breakpoint.Index, breakpoint); if (reached_main) pending_bpts.Add (breakpoint, BreakpointHandle.Action.Insert); } }
public int InsertBreakEvent(DL.BreakEvent be, bool enable) { CancelRuntimeInvokes(); DL.Breakpoint bp = be as DL.Breakpoint; MD.Event ev = null; if (bp != null) { MD.SourceLocation location = new MD.SourceLocation(bp.FileName, bp.Line); MD.SourceBreakpoint sbp = new MD.SourceBreakpoint(session, ThreadGroup.Global, location); mdbAdaptor.InitializeBreakpoint(sbp); session.AddEvent(sbp); ev = sbp; } else if (be is Catchpoint) { lock (pendingCatchpoints) { Catchpoint cp = (Catchpoint)be; ML.TargetType exc = null; if (process != null) { foreach (Module mod in process.Modules) { exc = mod.Language.LookupType(cp.ExceptionName); if (exc != null) { break; } } } if (exc != null) { ev = session.InsertExceptionCatchPoint(process.MainThread, ThreadGroup.Global, exc); } else { pendingCatchpoints.Add(cp); return(-1); } } } ev.IsEnabled = enable; if (!initializing) { lock (debugger) { mdbAdaptor.ActivateEvent(ev); } } if (bp != null && !running && !initializing && activeThread.CurrentFrame != null && !string.IsNullOrEmpty(bp.ConditionExpression) && bp.BreakIfConditionChanges) { // Initial expression evaluation MdbEvaluationContext ctx = new MdbEvaluationContext(activeThread, activeThread.CurrentFrame, null, SessionOptions.EvaluationOptions); ML.TargetObject ob = EvaluateExp(ctx, bp.ConditionExpression); if (ob != null) { lastConditionValue [ev.Index] = evaluator.TargetObjectToExpression(ctx, ob).Value; } } events [ev.Index] = be; return(ev.Index); }
public void ActivateEventAsync(Event handle) { ActivateOrDeactivateEventAsync (handle, true); }