@Override public boolean isEnabled() { return delegate.isEnabled(); }
@Override public boolean isEnabled() { return delegate.isEnabled(); }
DebuggerNode lookupNode(EventContext context) { if (!isEnabled()) { return null; } else { EventBinding<? extends ExecutionEventNodeFactory> binding = breakpointBinding; if (binding != null) { return (DebuggerNode) context.lookupExecutionEventNode(binding); } return null; } }
DebuggerNode lookupNode(EventContext context) { if (!isEnabled()) { return null; } else { EventBinding<? extends ExecutionEventNodeFactory> binding = breakpointBinding; if (binding != null) { return (DebuggerNode) context.lookupExecutionEventNode(binding); } return null; } }
@TruffleBoundary @SuppressWarnings("hiding") // We want to mask "sessions", as we recieve preferred ones private void doBreak(DebuggerNode source, DebuggerSession[] sessions, MaterializedFrame frame, boolean onEnter, Object result, BreakpointConditionFailure failure) { if (!isEnabled()) { // make sure we do not cause break events if we got disabled already // the instrumentation framework will make sure that this is not happening if the // binding was disposed. return; } SuspendAnchor anchor = onEnter ? SuspendAnchor.BEFORE : SuspendAnchor.AFTER; for (DebuggerSession session : sessions) { if (session.isBreakpointsActive()) { session.notifyCallback(source, frame, anchor, null, result, failure); } } }
/** * 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; }
@TruffleBoundary private Object doBreak(DebuggerNode source, DebuggerSession[] breakInSessions, MaterializedFrame frame, boolean onEnter, Object result, Throwable exception, Node throwLocation, boolean isCatchNodeComputed, DebugException.CatchLocation catchLocation, BreakpointConditionFailure failure) { if (!isEnabled()) { // make sure we do not cause break events if we got disabled already // the instrumentation framework will make sure that this is not happening if the // binding was disposed. return result; } if (this.hitCount.incrementAndGet() <= ignoreCount) { // breakpoint hit was ignored return result; } SuspendAnchor anchor = onEnter ? SuspendAnchor.BEFORE : SuspendAnchor.AFTER; Object newResult = result; for (DebuggerSession session : breakInSessions) { if (session.isBreakpointsActive(getKind())) { DebugException de; if (exception != null) { de = new DebugException(session, exception, null, throwLocation, isCatchNodeComputed, catchLocation); } else { de = null; } newResult = session.notifyCallback(source, frame, anchor, null, newResult, de, failure); } } return newResult; }
if (!isEnabled()) { return false;