use of com.sun.jdi.event.BreakpointEvent in project jdk8u_jdk by JetBrains.
the class OomDebugTest method runTests.
@Override
protected void runTests() throws Exception {
try {
addListener(new TargetAdapter() {
@Override
public void exceptionThrown(ExceptionEvent event) {
String name = event.exception().referenceType().name();
System.err.println("DEBUG: Exception thrown in debuggee was: " + name);
}
});
/*
* Get to the top of entry()
* to determine targetClass and mainThread
*/
BreakpointEvent bpe = startTo("OomDebugTestTarget", "entry", "()V");
targetClass = bpe.location().declaringType();
mainThread = bpe.thread();
StackFrame frame = mainThread.frame(0);
thisObject = frame.thisObject();
java.lang.reflect.Method m = findTestMethod();
m.invoke(this);
} catch (NoSuchMethodException e) {
e.printStackTrace();
failure();
} catch (SecurityException e) {
e.printStackTrace();
failure();
}
/*
* resume the target, listening for events
*/
listenUntilVMDisconnect();
}
Aggregations