Debugger(Env env) { this.env = env; this.msgNodes = new ObjectStructures.MessageNodes(); this.alwaysHaltBreakpoint = new Breakpoint(BreakpointLocation.ANY, SuspendAnchor.BEFORE, false, null); this.alwaysHaltBreakpoint.setEnabled(true); }
Debugger(Env env) { this.env = env; this.msgNodes = new ObjectStructures.MessageNodes(); this.alwaysHaltBreakpoint = new Breakpoint(BreakpointLocation.ANY, SuspendAnchor.BEFORE); this.alwaysHaltBreakpoint.setEnabled(true); }
/** * Permanently prevents this breakpoint from affecting execution. When not * {@link #isModifiable() modifiable}, {@link IllegalStateException} is thrown. * * @since 0.9 */ public synchronized void dispose() { if (!disposed) { setEnabled(false); if (sourceBinding != null) { sourceBinding.dispose(); sourceBinding = null; } for (DebuggerSession session : sessions) { session.disposeBreakpoint(this); } if (debugger != null) { debugger.disposeBreakpoint(this); debugger = null; } disposed = true; } }
/** * Permanently prevents this breakpoint from affecting execution. When not * {@link #isModifiable() modifiable}, {@link IllegalStateException} is thrown. * * @since 0.9 */ public synchronized void dispose() { if (!disposed) { setEnabled(false); if (sourceBinding != null) { sourceBinding.dispose(); sourceBinding = null; } for (DebuggerSession session : sessions) { session.disposeBreakpoint(this); } if (debugger != null) { debugger.disposeBreakpoint(this); debugger = null; } disposed = true; } }
/** * Returns <code>true</code> if it should appear in the breakpoints list. * * @throws BreakpointConditionFailure */ boolean notifyIndirectHit(DebuggerNode source, DebuggerNode node, MaterializedFrame frame) throws BreakpointConditionFailure { if (!isEnabled()) { return false; } assert node.getBreakpoint() == this; if (source != node) { // TODO: We're testing the breakpoint condition for a second time (GR-7398). if (!((AbstractBreakpointNode) node).shouldBreak(frame)) { return false; } } else { // don't do the assert here, the breakpoint condition might have side effects. // assert ((BreakpointNode) node).shouldBreak(frame); } if (this.hitCount.incrementAndGet() <= ignoreCount) { // breakpoint hit was ignored return false; } if (isOneShot()) { setEnabled(false); } return true; }