test/hotspot/jtreg/serviceability/jdwp/DebuggeeLauncher.java
author sspitsyn
Tue, 26 Jun 2018 13:50:59 -0700
changeset 50802 fa380b3b2b7d
parent 47216 71c04702a3d5
permissions -rw-r--r--
8205721: Problem list serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStatArrayCorrectnessTest.java Summary: Add the test to the ProblemList.txt Reviewed-by: dcubed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40891
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
     1
/*
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
     4
 *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
     7
 * published by the Free Software Foundation.
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
     8
 *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    13
 * accompanied this code).
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    14
 *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    18
 *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    21
 * questions.
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    22
 */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    23
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    24
import java.io.IOException;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    25
import java.net.ServerSocket;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    26
import java.util.StringTokenizer;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    27
import jdk.test.lib.JDKToolFinder;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    28
import jdk.test.lib.Utils;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    29
import static jdk.test.lib.Asserts.assertFalse;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    30
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    31
/**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    32
 * Launches the debuggee with the necessary JDWP options and handles the output
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    33
 */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    34
public class DebuggeeLauncher implements StreamHandler.Listener {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    35
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    36
    public interface Listener {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    37
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    38
        /**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    39
         * Callback to use when a module name is received from the debuggee
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    40
         *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    41
         * @param modName module name reported by the debuggee
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    42
         */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    43
        void onDebuggeeModuleInfo(String modName);
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    44
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    45
        /**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    46
         * Callback to use when the debuggee completes sending out the info
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    47
         */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    48
        void onDebuggeeSendingCompleted();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    49
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    50
        /**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    51
         * Callback to handle any debuggee error
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    52
         *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    53
         * @param line line from the debuggee's stderr
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    54
         */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    55
        void onDebuggeeError(String line);
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    56
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    57
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    58
    private static int jdwpPort = -1;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    59
    private static final String CLS_DIR = System.getProperty("test.classes", "").trim();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    60
    private static final String DEBUGGEE = "AllModulesCommandTestDebuggee";
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    61
    private Process p;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    62
    private final Listener listener;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    63
    private StreamHandler inputHandler;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    64
    private StreamHandler errorHandler;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    65
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    66
    /**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    67
     * @param listener the listener we report the debuggee events to
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    68
     */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    69
    public DebuggeeLauncher(Listener listener) {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    70
        this.listener = listener;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    71
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    72
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    73
    /**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    74
     * Starts the debuggee with the necessary JDWP options and handles the
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    75
     * debuggee's stdout and stderr outputs
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    76
     *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    77
     * @throws Throwable
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    78
     */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    79
    public void launchDebuggee() throws Throwable {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    80
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    81
        ProcessBuilder pb = new ProcessBuilder(getCommand());
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    82
        p = pb.start();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    83
        inputHandler = new StreamHandler(p.getInputStream(), this);
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    84
        errorHandler = new StreamHandler(p.getErrorStream(), this);
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    85
        inputHandler.start();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    86
        errorHandler.start();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    87
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    88
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    89
    /**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    90
     * Command to start the debuggee with the JDWP options and using the JDK
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    91
     * under test
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    92
     *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    93
     * @return the command
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    94
     */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    95
    private String[] getCommand() {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    96
        return new String[]{
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    97
            JDKToolFinder.getTestJDKTool("java"),
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    98
            getJdwpOptions(),
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
    99
            "-cp",
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   100
            CLS_DIR,
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   101
            DEBUGGEE
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   102
        };
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   103
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   104
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   105
    /**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   106
     * Terminates the debuggee
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   107
     */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   108
    public void terminateDebuggee() {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   109
        if (p.isAlive()) {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   110
            p.destroyForcibly();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   111
        }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   112
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   113
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   114
    /**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   115
     * Debuggee JDWP options
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   116
     *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   117
     * @return the JDWP options to start the debuggee with
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   118
     */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   119
    private static String getJdwpOptions() {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   120
        return "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=" + getJdwpPort();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   121
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   122
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   123
    /**
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   124
     * Find an available port for the JDWP session
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   125
     *
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   126
     * @return JDWP port
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   127
     */
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   128
    public static int getJdwpPort() {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   129
        if (jdwpPort == -1) {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   130
            jdwpPort = findFreePort();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   131
            assertFalse(jdwpPort == -1, "Can not find vailbale port for JDWP");
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   132
        }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   133
        return jdwpPort;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   134
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   135
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   136
    private static int findFreePort() {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   137
        try (ServerSocket socket = new ServerSocket(0)) {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   138
            return socket.getLocalPort();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   139
        } catch (IOException e) {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   140
        }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   141
        return -1;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   142
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   143
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   144
    @Override
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   145
    public void onStringRead(StreamHandler handler, String line) {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   146
        if (handler.equals(errorHandler)) {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   147
            terminateDebuggee();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   148
            listener.onDebuggeeError(line);
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   149
        } else {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   150
            processDebuggeeOutput(line);
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   151
        }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   152
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   153
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   154
    private void processDebuggeeOutput(String line) {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   155
        StringTokenizer st = new StringTokenizer(line);
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   156
        String token = st.nextToken();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   157
        switch (token) {
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   158
            case "module":
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   159
                listener.onDebuggeeModuleInfo(st.nextToken());
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   160
                break;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   161
            case "ready":
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   162
                listener.onDebuggeeSendingCompleted();
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   163
                break;
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   164
        }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   165
    }
8010999ff6d0 8148103: add more tests for task "Update JDI and JDWP for modules"
akulyakh
parents:
diff changeset
   166
}