/** * Returns the guest language source section of the AST node before/after the execution is * suspended. Returns <code>null</code> if no source section information is available. * <p> * This method is thread-safe. * * @since 0.17 */ public SourceSection getSourceSection() { verifyValidState(true); return sourceSection; }
/** * Returns where, within the guest language {@link #getSourceSection() source section}, the * suspended position is. * * @since 0.32 */ public SuspendAnchor getSuspendAnchor() { verifyValidState(true); return suspendAnchor; }
/** * Returns where, within the guest language {@link #getSourceSection() source section}, the * suspended position is. * * @since 0.32 */ public SuspendAnchor getSuspendAnchor() { verifyValidState(true); return suspendAnchor; }
/** * Returns the debugger session this suspended event was created for. * <p> * This method is thread-safe. * * @since 0.17 */ public DebuggerSession getSession() { verifyValidState(true); return session; }
void verifyValidState() { if (event != null) { event.verifyValidState(false); } } }
void verifyValidState(boolean allowDifferentThread) { event.verifyValidState(allowDifferentThread); }
void verifyValidState(boolean allowDifferentThread) { event.verifyValidState(allowDifferentThread); }
/** * Returns the debugger session this suspended event was created for. * <p> * This method is thread-safe. * * @since 0.17 */ public DebuggerSession getSession() { verifyValidState(true); return session; }
void verifyValidState() { if (event != null) { event.verifyValidState(false); } } }
/** * Returns the {@link Breakpoint breakpoints} that individually would cause the "hit" where * execution is suspended. If {@link Debugger#install(com.oracle.truffle.api.debug.Breakpoint) * Debugger-associated} breakpoint was hit, it is not possible to change the state of returned * breakpoint. * <p> * This method is thread-safe. * * @return an unmodifiable list of breakpoints * * @since 0.17 */ public List<Breakpoint> getBreakpoints() { verifyValidState(true); return breakpoints; }
/** * Test if the language context of the source of the event is initialized. * * @since 0.26 */ public boolean isLanguageContextInitialized() { verifyValidState(true); return context.isLanguageContextInitialized(); }
public boolean hasNext() { verifyValidState(false); if (index == 0) { return true; } else { return getOtherStackFrames().hasNext(); } }
/** * Returns the guest language source section of the AST node before/after the execution is * suspended. Returns <code>null</code> if no source section information is available. * <p> * This method is thread-safe. * * @since 0.17 */ public SourceSection getSourceSection() { verifyValidState(true); return session.resolveSection(sourceSection); }
/** * Test if the language context of the source of the event is initialized. * * @since 0.26 */ public boolean isLanguageContextInitialized() { verifyValidState(true); return context.isLanguageContextInitialized(); }
public DebugStackFrame next() { verifyValidState(false); if (index == 0) { index++; return getTopStackFrame(); } else { return getOtherStackFrames().next(); } }
public DebugStackFrame next() { verifyValidState(false); if (index == 0) { index++; return getTopStackFrame(); } else { return getOtherStackFrames().next(); } }
public boolean hasNext() { verifyValidState(false); if (index == 0) { return true; } else { return getOtherStackFrames().hasNext(); } }
/** * Change the return value. When there is a {@link #getReturnValue() return value} at the * current location, this method modifies the return value to a new one. * * @param newValue the new return value, can not be <code>null</code> * @throws IllegalStateException when {@link #getReturnValue()} returns <code>null</code> * @since 1.0 */ public void setReturnValue(DebugValue newValue) { verifyValidState(false); if (returnValue == null) { throw new IllegalStateException("Can not set return value when there is no current return value."); } this.returnValue = newValue.get(); }
private synchronized void setNextStrategy(SteppingStrategy nextStrategy) { verifyValidState(true); if (this.nextStrategy == null) { this.nextStrategy = nextStrategy; } else if (this.nextStrategy.isKill()) { throw new IllegalStateException("Calls to prepareKill() cannot be followed by any other preparation call."); } else if (this.nextStrategy.isDone()) { throw new IllegalStateException("Calls to prepareContinue() cannot be followed by any other preparation call."); } else if (this.nextStrategy.isComposable()) { this.nextStrategy.add(nextStrategy); } else { this.nextStrategy = SteppingStrategy.createComposed(this.nextStrategy, nextStrategy); } }
private synchronized void setNextStrategy(SteppingStrategy nextStrategy) { verifyValidState(true); if (this.nextStrategy == null) { this.nextStrategy = nextStrategy; } else if (this.nextStrategy.isKill()) { throw new IllegalStateException("Calls to prepareKill() cannot be followed by any other preparation call."); } else if (this.nextStrategy.isDone()) { throw new IllegalStateException("Calls to prepareContinue() cannot be followed by any other preparation call."); } else if (this.nextStrategy.isComposable()) { this.nextStrategy.add(nextStrategy); } else { this.nextStrategy = SteppingStrategy.createComposed(this.nextStrategy, nextStrategy); } }