Sha256: c3a9fc6e6504a5612131881c57b0df150db713de5915178e1daba93e43406d7f

Contents?: true

Size: 1.28 KB

Versions: 135

Compression:

Stored size: 1.28 KB

Contents

/*
 * Copyright 2006-2007 Yu Su
 * Distributed under the BSD License
 */
package com.xruby.debug;

/**
 * Run instruction, only for "launch target"
 *
 * @author Yu Su (beanworms@gmail.com)
 */
public class RunInsn implements Instruction {
    private static final String MESSAGE = "JVM has started already.";
    /**
     * Execute Run instruction, general process is listed as below:
     * 1. Start/Launch the process, pass the arguments to debugee
     * 2. Set Debug track mode
     * 3. Construct&attache the event handler
     * 4. Start threads handling in/error/out streams
     */
    public Result execute() {
        Result result = new Result();
        if(DebugContext.isStarted()) {
            result.setStatus(Result.Status.ERROR);
            result.setErrMsg(MESSAGE);

            return result;
        }

        // Start JVM, program start running
        JVMConnection connection = DebugContext.getJvmConnection();
        connection.start();            

        if ((DebugContext.getHandler() == null) &&
             DebugContext.isStarted())
        {
            DebugContext.setHandler(new EventHandler(DebugContext.getNotifier(), false));
        }

        result.setStatus(Result.Status.SUCCESSFUL);

        return result;
    }
}

Version data entries

135 entries across 135 versions & 2 rubygems

Version Path
rhodes-7.6.0 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-7.5.1 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-7.4.1 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-7.1.17 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-6.2.0 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-6.0.11 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-5.5.18 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-5.5.17 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-5.5.15 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-5.5.0.22 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-5.5.2 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-5.5.0.7 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-5.5.0.3 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-5.5.0 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
tauplatform-1.0.3 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
tauplatform-1.0.2 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
tauplatform-1.0.1 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-3.5.1.12 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-3.3.5 platform/shared/xruby/src/com/xruby/debug/RunInsn.java
rhodes-3.4.2 platform/shared/xruby/src/com/xruby/debug/RunInsn.java