jdk/test/com/sun/jdi/cds/CDSFieldWatchpoints.java
author cjplummer
Wed, 24 Jun 2015 11:59:11 -0700
changeset 31672 b500fc688bf0
parent 31452 5f705077cf7a
child 36966 4209c9e19c45
permissions -rw-r--r--
8129386: [TESTBUG] - com/sun/jdi/cds/*.java missing @build tag for libraries Summary: Added @build tags for all dependent classes Reviewed-by: iklam, mseledtsov, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31452
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
     1
/*
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
     4
 *
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
     7
 * published by the Free Software Foundation.
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
     8
 *
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    13
 * accompanied this code).
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    14
 *
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    18
 *
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    21
 * questions.
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    22
 */
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    23
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    24
/*
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    25
 * @test
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    26
 * @bug 8054386
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    27
 * @summary java debugging test for CDS
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    28
 * @modules jdk.jdi
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    29
 *          java.base/sun.misc
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    30
 *          java.management
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    31
 *          jdk.jartool/sun.tools.jar
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    32
 * @library /lib/testlibrary
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    33
 * @library ..
31672
b500fc688bf0 8129386: [TESTBUG] - com/sun/jdi/cds/*.java missing @build tag for libraries
cjplummer
parents: 31452
diff changeset
    34
 * @build jdk.testlibrary.*
b500fc688bf0 8129386: [TESTBUG] - com/sun/jdi/cds/*.java missing @build tag for libraries
cjplummer
parents: 31452
diff changeset
    35
 * @build TestScaffold VMConnection TargetListener TargetAdapter
b500fc688bf0 8129386: [TESTBUG] - com/sun/jdi/cds/*.java missing @build tag for libraries
cjplummer
parents: 31452
diff changeset
    36
 * @build CDSJDITest
31452
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    37
 * @run compile -g ../FieldWatchpoints.java
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    38
 * @run main CDSFieldWatchpoints
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    39
 */
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    40
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    41
/*
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    42
 * Launch the JDI FieldWatchpoints test, which will setup field watchpoints in
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    43
 * FieldWatchpointsDebugee. FieldWatchpointsDebugee is first dumped into the
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    44
 * CDS archive, so this will test debugging a class in the archive.
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    45
 */
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    46
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    47
public class CDSFieldWatchpoints extends CDSJDITest {
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    48
    static String jarClasses[] = {
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    49
        // FieldWatchpointsDebugee. A, and B are the only classes we need in the archive.
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    50
        // FieldWatchpointsDebugee will be launched by FieldWatchpoints as the debuggee
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    51
        // application. Note, compiling FieldWatchpoints.java above will cause
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    52
        // FieldWatchpointsDebugee to be compiled since it is also in FieldWatchpoints.java.
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    53
        "FieldWatchpointsDebugee", "A", "B",
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    54
    };
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    55
    static String testname = "FieldWatchpoints";
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    56
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    57
    public static void main(String[] args) throws Exception {
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    58
        runTest(testname, jarClasses);
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    59
    }
5f705077cf7a 8054386: Allow Java debugging when CDS is enabled
cjplummer
parents:
diff changeset
    60
}