SteppingStrategy getNextStrategy() { SteppingStrategy strategy = nextStrategy; if (strategy == null) { return SteppingStrategy.createContinue(); } return strategy; }
SteppingStrategy getNextStrategy() { SteppingStrategy strategy = nextStrategy; if (strategy == null) { return SteppingStrategy.createContinue(); } return strategy; }
/** * Prepare to execute in Continue mode when guest language program execution resumes. In this * mode execution will continue until either: * <ul> * <li>execution arrives at a node to which an enabled breakpoint is attached, * <strong>or:</strong></li> * <li>execution completes.</li> * </ul> * <p> * This method is thread-safe and the prepared Continue mode is appended to any other previously * prepared modes. No further modes can be prepared after continue. * * @throws IllegalStateException when {@link #prepareContinue() continue} or * {@link #prepareKill() kill} is prepared already. * @since 0.9 */ public void prepareContinue() { setNextStrategy(SteppingStrategy.createContinue()); }
/** * Prepare to execute in Continue mode when guest language program execution resumes. In this * mode execution will continue until either: * <ul> * <li>execution arrives at a node to which an enabled breakpoint is attached, * <strong>or:</strong></li> * <li>execution completes.</li> * </ul> * <p> * This method is thread-safe and the prepared Continue mode is appended to any other previously * prepared modes. No further modes can be prepared after continue. * * @throws IllegalStateException when {@link #prepareContinue() continue} or * {@link #prepareKill() kill} is prepared already. * @since 0.9 */ public void prepareContinue() { setNextStrategy(SteppingStrategy.createContinue()); }
/** * Resumes the execution on a given thread if it has not been suspended yet. * * @param t the thread to resume */ // TODO make part of public API as soon as PolyglotEngine is thread-safe synchronized void resume(Thread t) { if (Debugger.TRACE) { trace("resume threads", t); } if (closed) { throw new IllegalStateException("session closed"); } setSteppingStrategy(t, SteppingStrategy.createContinue(), true); }
/** * Resumes the execution on a given thread if it has not been suspended yet. * * @param t the thread to resume */ // TODO make part of public API as soon as PolyglotEngine is thread-safe synchronized void resume(Thread t) { if (Debugger.TRACE) { trace("resume threads", t); } if (closed) { throw new IllegalStateException("session closed"); } setSteppingStrategy(t, SteppingStrategy.createContinue(), true); }
private synchronized SteppingStrategy notifyNewThread(Thread currentThread) { SteppingStrategy s = getSteppingStrategy(currentThread); // double checked locking if (s == null) { if (suspendAll) { // all suspended s = SteppingStrategy.createAlwaysHalt(); } else { // not suspended continue execution for this thread s = SteppingStrategy.createContinue(); } setSteppingStrategy(currentThread, s, true); } assert s != null; return s; }
private synchronized SteppingStrategy notifyNewThread(Thread currentThread) { SteppingStrategy s = getSteppingStrategy(currentThread); // double checked locking if (s == null) { if (suspendAll) { // all suspended s = SteppingStrategy.createAlwaysHalt(); } else { // not suspended continue execution for this thread s = SteppingStrategy.createContinue(); } setSteppingStrategy(currentThread, s, true); } assert s != null; return s; }