--- old/make/data/jdwp/jdwp.spec Thu Dec 10 01:42:33 2015 +++ new/make/data/jdwp/jdwp.spec Thu Dec 10 01:42:32 2015 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -569,6 +569,21 @@ (Error VM_DEAD) ) ) + (Command AllModules=22 + "Returns all modules in the target VM." + "

Since JDWP version 1.9." + (Out + ) + (Reply + (Repeat modules "The number of the modules that follow." + (moduleID module "One of the modules.") + ) + ) + (ErrorSet + (Error NOT_IMPLEMENTED) + (Error VM_DEAD) + ) + ) ) (CommandSet ReferenceType=2 @@ -1029,6 +1044,22 @@ (Error VM_DEAD) ) ) + (Command Module=19 + "Returns the module this reference type belongs to." + "

Since JDWP version 1.9." + (Out + (referenceType refType "The reference type.") + ) + (Reply + (moduleID module "The module this reference type belongs to.") + ) + (ErrorSet + (Error INVALID_CLASS "refType is not the ID of a reference type.") + (Error INVALID_OBJECT "refType is not a known ID.") + (Error NOT_IMPLEMENTED) + (Error VM_DEAD) + ) + ) ) (CommandSet ClassType=3 (Command Superclass=1 @@ -2647,6 +2678,54 @@ ) ) ) +(CommandSet Module=18 + (Command Name=1 + "Returns the name of this module." + "

Since JDWP version 1.9." + (Out + (moduleID module "This module.") + ) + (Reply + (string name "The module's name.") + ) + (ErrorSet + (Error INVALID_MODULE) + (Error NOT_IMPLEMENTED) + (Error VM_DEAD) + ) + ) + (Command ClassLoader=2 + "Returns the class loader of this module." + "

Since JDWP version 1.9." + (Out + (moduleID module "This module.") + ) + (Reply + (classLoaderObject classLoader "The module's class loader.") + ) + (ErrorSet + (Error INVALID_MODULE) + (Error NOT_IMPLEMENTED) + (Error VM_DEAD) + ) + ) + (Command CanRead=3 + "Returns true if this module can read the target module; false otherwise." + "

Since JDWP version 1.9." + (Out + (moduleID module "This module.") + (moduleID tagetModule "The target module.") + ) + (Reply + (boolean canRead "true if this module can read the target module; false otherwise.") + ) + (ErrorSet + (Error INVALID_MODULE "This module or targetModule is not the ID of a module.") + (Error NOT_IMPLEMENTED) + (Error VM_DEAD) + ) + ) +) (CommandSet Event=64 (Command Composite=100 "Several events may occur at a given time in the target VM. " @@ -3054,6 +3133,7 @@ (Constant INVALID_SLOT =35 "Invalid slot.") (Constant DUPLICATE =40 "Item already set.") (Constant NOT_FOUND =41 "Desired element not found.") + (Constant INVALID_MODULE =42 "Invalid module.") (Constant INVALID_MONITOR =50 "Invalid monitor.") (Constant NOT_MONITOR_OWNER =51 "This thread doesn't own the monitor.") (Constant INTERRUPT =52 "The call has been interrupted before completion.") --- old/make/src/classes/build/tools/jdwpgen/Parse.java Thu Dec 10 01:42:33 2015 +++ new/make/src/classes/build/tools/jdwpgen/Parse.java Thu Dec 10 01:42:33 2015 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -80,6 +80,7 @@ kindMap.put("field", new FieldTypeNode()); kindMap.put("frame", new FrameTypeNode()); kindMap.put("string", new StringTypeNode()); + kindMap.put("moduleID", new ModuleTypeNode()); kindMap.put("value", new ValueTypeNode()); kindMap.put("byte", new ByteTypeNode()); kindMap.put("location", new LocationTypeNode()); --- old/src/java.base/share/native/include/jni.h Thu Dec 10 01:42:34 2015 +++ new/src/java.base/share/native/include/jni.h Thu Dec 10 01:42:34 2015 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -770,7 +770,8 @@ jobject (JNICALL *GetModule) (JNIEnv* env, jclass clazz); - + jsize (JNICALL *GetAllModules) + (JNIEnv* env, jobjectArray *modules); }; /* @@ -1868,8 +1869,10 @@ jobject GetModule(jclass clazz) { return functions->GetModule(this, clazz); } + jsize GetAllModules(jobjectArray *modules) { + return functions->GetAllModules(this, modules); + } - #endif /* __cplusplus */ }; --- old/src/jdk.jdi/share/classes/com/sun/jdi/ReferenceType.java Thu Dec 10 01:42:35 2015 +++ new/src/jdk.jdi/share/classes/com/sun/jdi/ReferenceType.java Thu Dec 10 01:42:34 2015 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -118,6 +118,21 @@ ClassLoaderReference classLoader(); /** + * Gets the module object which contains the class corresponding + * to this type. + * + * @return a {@link Module} which mirrors the module in the target VM. + * + * @throws java.lang.UnsupportedOperationException if + * the target virtual machine does not support this + * operation. + *