internal Breakpoint Clone (int breakpoint_id) { SourceBreakpoint new_bpt = new SourceBreakpoint ( session, GetNextEventIndex (), ThreadGroup, location); new_bpt.handle = new SimpleBreakpointHandle (new_bpt, breakpoint_id); return new_bpt; }
// // Breakpoints // public Event InsertBreakpoint(ThreadGroup group, SourceLocation location) { Breakpoint bpt = new SourceBreakpoint(this, group, location); AddEvent(bpt); return(bpt); }
internal Breakpoint Clone(int breakpoint_id) { SourceBreakpoint new_bpt = new SourceBreakpoint ( session, GetNextEventIndex (), ThreadGroup, location); new_bpt.handle = new SimpleBreakpointHandle (new_bpt, breakpoint_id); return new_bpt; }
void RemoveBreakpoint(SourceBreakpoint breakpoint) { RemoteTreeNode node = (RemoteTreeNode)breakpointToTreeNode[breakpoint]; if (node != null) { node.Remove(); } breakpointToTreeNode.Remove(breakpoint); }
void UpdateBreakpoint(SourceBreakpoint breakpoint) { RemoteTreeNode node = (RemoteTreeNode)breakpointToTreeNode[breakpoint]; if (node == null) { node = RootNode.AppendNode(); breakpointToTreeNode.Add(breakpoint, node); } node.SetValue(ColumnLocation, new SourceCodeLocation(breakpoint.Location)); node.SetValue(ColumnImage, breakpoint.IsEnabled && breakpoint.IsActivated ? Pixmaps.Breakpoint : Pixmaps.BreakpointDisabled); node.SetValue(ColumnID, breakpoint.Index); node.SetValue(ColumnEnabled, breakpoint.IsEnabled ? "Yes" : "No"); node.SetValue(ColumnActivated, breakpoint.IsActivated ? "Yes" : "No"); node.SetValue(ColumnThreadGroup, breakpoint.ThreadGroup != null ? breakpoint.ThreadGroup.Name : "global"); node.SetValue(ColumnName, breakpoint.Name); }
public override void InitializeBreakpoint(MDB.SourceBreakpoint bp) { // bp.IsUserModule = true; }
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 virtual void InitializeBreakpoint(MDB.SourceBreakpoint bp) { }
// // Breakpoints // public Event InsertBreakpoint(ThreadGroup group, SourceLocation location) { Breakpoint bpt = new SourceBreakpoint (this, group, location); AddEvent (bpt); return bpt; }
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; }