/*
* Copyright 2012 SAP AG. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test FieldMonitor.java
* @bug 7158988
* @key regression
* @summary verify jvm does not crash while debugging
* @run compile TestPostFieldModification.java
* @author axel.siebenborn@sap.com
*/
public class FieldMonitor {
throws IOException, InterruptedException {
}
//VirtualMachine vm = launchTarget(sb.toString());
// set watch field on already loaded classes
}
// watch for loaded classes
// process events
// resume the vm
// Copy target's output and error to our output and error.
boolean connected = true;
while (connected) {
if (event instanceof VMDeathEvent
|| event instanceof VMDisconnectEvent) {
// exit
connected = false;
} else if (event instanceof ClassPrepareEvent) {
// watch field on loaded class
.referenceType();
} else if (event instanceof ModificationWatchpointEvent) {
+ modEvent.valueCurrent());
}
}
}
// Shutdown begins when event thread terminates
try {
} catch (InterruptedException exc) {
// we don't interrupt
}
}
/**
* Find a com.sun.jdi.CommandLineLaunch connector
*/
return (LaunchingConnector)connector;
}
}
throw new Error("No launching connector");
}
/**
* Return the launching connector's arguments.
*/
static Map <String,Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
}
throw new Error("Bad launching connector");
}
if (optionsArg == null) {
throw new Error("Bad launching connector");
}
return arguments;
}
try {
} catch (IOException exc) {
} catch (IllegalConnectorArgumentsException exc) {
} catch (VMStartException exc) {
throw new Error("Target VM failed to initialize: " +
exc.getMessage());
}
}
classPrepareRequest.setEnabled(true);
}
}
}
/**
* Set up for copy.
* @param name Name of the thread
* @param in Stream to copy from
* @param out Stream to copy to
*/
super(name);
}
/**
* Copy.
*/
public void run() {
try {
}
} catch(IOException exc) {
}
}
}