diff --git a/make/hotspot/gensrc/GensrcJvmti.gmk b/make/hotspot/gensrc/GensrcJvmti.gmk index d09af2eb36b..0e347dc7d1e 100644 --- a/make/hotspot/gensrc/GensrcJvmti.gmk +++ b/make/hotspot/gensrc/GensrcJvmti.gmk @@ -100,12 +100,17 @@ define SetupJvmtiGeneration endef $(eval $(call SetupJvmtiGeneration, jvmtiEnter.cpp, jvmtiEnter.xsl, \ + -PARAM majorversion $(VERSION_FEATURE) \ -PARAM interface jvmti)) $(eval $(call SetupJvmtiGeneration, jvmtiEnterTrace.cpp, jvmtiEnter.xsl, \ + -PARAM majorversion $(VERSION_FEATURE) \ -PARAM interface jvmti -PARAM trace Trace)) -$(eval $(call SetupJvmtiGeneration, jvmtiEnv.hpp, jvmtiHpp.xsl)) -$(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl)) -$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl)) +$(eval $(call SetupJvmtiGeneration, jvmtiEnv.hpp, jvmtiHpp.xsl, \ + -PARAM majorversion $(VERSION_FEATURE))) +$(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl, \ + -PARAM majorversion $(VERSION_FEATURE))) +$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl, \ + -PARAM majorversion $(VERSION_FEATURE))) JVMTI_BC_SRCDIR := $(TOPDIR)/src/hotspot/share/interpreter diff --git a/src/hotspot/share/prims/jvmti.xml b/src/hotspot/share/prims/jvmti.xml index b55c108275b..28747e4fb62 100644 --- a/src/hotspot/share/prims/jvmti.xml +++ b/src/hotspot/share/prims/jvmti.xml @@ -26,10 +26,7 @@ - + @@ -357,10 +354,7 @@ ]> - + <tm>JVM</tm> Tool Interface diff --git a/src/hotspot/share/prims/jvmti.xsl b/src/hotspot/share/prims/jvmti.xsl index 8ab9f170a47..3a8d416c8df 100644 --- a/src/hotspot/share/prims/jvmti.xsl +++ b/src/hotspot/share/prims/jvmti.xsl @@ -1899,12 +1899,20 @@ typedef struct { + + + + + + + +

Change History

Last update:
- Version: + Version:
diff --git a/src/hotspot/share/prims/jvmtiExport.cpp b/src/hotspot/share/prims/jvmtiExport.cpp index 34219ff825c..cefa30e0756 100644 --- a/src/hotspot/share/prims/jvmtiExport.cpp +++ b/src/hotspot/share/prims/jvmtiExport.cpp @@ -383,7 +383,10 @@ JvmtiExport::get_jvmti_interface(JavaVM *jvm, void **penv, jint version) { } break; default: - return JNI_EVERSION; // unsupported major version number + // Starting from 13 we do not care about minor version anymore + if (major < 13 || major > Abstract_VM_Version::vm_major_version()) { + return JNI_EVERSION; // unsupported major version number + } } if (JvmtiEnv::get_phase() == JVMTI_PHASE_LIVE) { diff --git a/src/hotspot/share/prims/jvmtiH.xsl b/src/hotspot/share/prims/jvmtiH.xsl index 7ac6f88e04c..6a98b4cf32b 100644 --- a/src/hotspot/share/prims/jvmtiH.xsl +++ b/src/hotspot/share/prims/jvmtiH.xsl @@ -1,6 +1,6 @@ + 0 * 0x100) diff --git a/src/hotspot/share/prims/jvmtiLib.xsl b/src/hotspot/share/prims/jvmtiLib.xsl index 3c3ef9e0856..05700cf1fdd 100644 --- a/src/hotspot/share/prims/jvmtiLib.xsl +++ b/src/hotspot/share/prims/jvmtiLib.xsl @@ -1,7 +1,7 @@ + 0 - - . - + + + .0 diff --git a/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerImpl.java b/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerImpl.java index af1abc5848f..bd324a814ac 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerImpl.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, 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 @@ -52,7 +52,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManagerService { private final ThreadGroup mainGroupForJDI; private ResourceBundle messages = null; private int vmSequenceNumber = 0; - private static final int majorVersion = 11; + private static final int majorVersion = Runtime.version().feature(); private static final int minorVersion = 0; private static final Object lock = new Object(); diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c index d7ca956dc57..a0ada0e228d 100644 --- a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c +++ b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, 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 @@ -35,8 +35,6 @@ #include "FrameID.h" static char *versionName = "Java Debug Wire Protocol (Reference Implementation)"; -static int majorVersion = 11; /* JDWP major version */ -static int minorVersion = 0; /* JDWP minor version */ static jboolean version(PacketInputStream *in, PacketOutputStream *out) @@ -46,6 +44,10 @@ version(PacketInputStream *in, PacketOutputStream *out) char *vmVersion; char *vmInfo; + /* Now the JDWP versions are the same as JVMTI versions */ + int majorVersion = jvmtiMajorVersion(); + int minorVersion = 0; + if (gdata->vmDead) { outStream_setError(out, JDWP_ERROR(VM_DEAD)); return JNI_TRUE;