Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/accessWatchpointRequests/accwtchpreq001t.java
41161 views
/*1* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223package nsk.jdi.EventRequestManager.accessWatchpointRequests;2425import nsk.share.*;26import nsk.share.jpda.*;27import nsk.share.jdi.*;282930/**31* This is debuggee class containing different kinds of fields32*/33public class accwtchpreq001t {34// instance fields35byte byteFld = 127;36short shortFld = -32768;37int intFld = 2147483647;38long longFld = 9223372036854775807L;39float floatFld = 5.1F;40double doubleFld = 6.2D;41char charFld = 'a';42boolean booleanFld = false;43String strFld = "instance field";44// fields with different access rights45static short sFld = 32767;46private byte prFld = -128;47public float pubFld = 0.9F;48protected double protFld = -435.789D;49transient int tFld = -2147483648;50volatile long vFld = -922337203685477580L;51final char fFld = 'z';5253public static void main(String args[]) {54ArgumentHandler argHandler = new ArgumentHandler(args);55IOPipe pipe = argHandler.createDebugeeIOPipe();5657pipe.println(accwtchpreq001.COMMAND_READY);58String cmd = pipe.readln();59if (!cmd.equals(accwtchpreq001.COMMAND_QUIT)) {60System.err.println("TEST BUG: unknown debugger command: "61+ cmd);62System.exit(accwtchpreq001.JCK_STATUS_BASE +63accwtchpreq001.FAILED);64}65System.exit(accwtchpreq001.JCK_STATUS_BASE +66accwtchpreq001.PASSED);67}68}697071