提交 f0f44989 编写于 作者: C clanger

8197943: Unable to use JDWP API in JDK 8 to debug JDK 9 VM

Reviewed-by: simonis, cjplummer
上级 6cdc40f5
/*
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -674,20 +674,18 @@ class VirtualMachineImpl extends MirrorImpl
versionInfo().jdwpMinor >= 6;
}
public boolean canGetInstanceInfo() {
if (versionInfo().jdwpMajor < 1 ||
versionInfo().jdwpMinor < 6) {
if (versionInfo().jdwpMajor > 1 ||
versionInfo().jdwpMinor >= 6) {
validateVM();
return hasNewCapabilities() &&
capabilitiesNew().canGetInstanceInfo;
} else {
return false;
}
validateVM();
return hasNewCapabilities() &&
capabilitiesNew().canGetInstanceInfo;
}
public boolean canUseSourceNameFilters() {
if (versionInfo().jdwpMajor < 1 ||
versionInfo().jdwpMinor < 6) {
return false;
}
return true;
return versionInfo().jdwpMajor > 1 ||
versionInfo().jdwpMinor >= 6;
}
public boolean canForceEarlyReturn() {
validateVM();
......@@ -703,12 +701,8 @@ class VirtualMachineImpl extends MirrorImpl
capabilitiesNew().canGetSourceDebugExtension;
}
public boolean canGetClassFileVersion() {
if ( versionInfo().jdwpMajor < 1 &&
versionInfo().jdwpMinor < 6) {
return false;
} else {
return true;
}
return versionInfo().jdwpMajor > 1 ||
versionInfo().jdwpMinor >= 6;
}
public boolean canGetConstantPool() {
validateVM();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册