preliminary RFR: 8049365 - Update JDI and JDWP for modules

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Fri Dec 11 09:33:28 UTC 2015


On 12/11/15 00:40, Alan Bateman wrote:
>
>
> On 10/12/2015 20:44, serguei.spitsyn at oracle.com wrote:
>> :
>>
>>>
>>> 3. In the Module command set then we'll need to decide the reply to 
>>> the Name command for the case that the module is an unnamed module. 
>>> There is also an open issue for the runtime API too.
>>
>> The empty string is returned in the implementation.
>> Would it be Ok to update the jdwp spec with this?
> We haven't decided what Module::getName should return for unnamed 
> modules yet, it currently returns null. So we'll have to come back to 
> it. For now then maybe JDWP can just return the stringID as 0 and 
> we'll come back to it.

In the jdwp.spec the 'stringObject' type is used instead of the 'stringID'.
For the name command I used the 'string' type for consistency as the the 
only
command where the 'stringObject' is returned is the 
VirtualMachine.CreateString.
I'm Ok to convert to using the 'stringObject' for Module.Name if you 
still prefer it.



>
>
>> :
>>
>>>
>>> In ReferenceTypeImpl then I assume isModuleCached is not needed.
>>
>> Not sure, I understand this. Why?
>> It seems there is some confusion here.
>> This flag is similar to the flag isClassLoaderCached.
>
> I should have been clearer, I was just making the point that the flag 
> isn't really needed as module == null will tell you that it hasn't 
> been retreived from the target VM.

I see now, thanks!
The isClassLoaderCached was needed because a classLoader can be null.
Fixed.

>
>
>>
>>> Have you thought about SA yet? I can't recall if it is compiled with 
>>> the boot JDK or will be compiled against the newly built jdk.jdi 
>>> module. If the later then I assume that SA will need updates. If the 
>>> former then I assume we will have issues with boot cycle builds.
>>
>> I'll ask Dmitry as he covers the SA.
>> He had some plans on the Jigsaw update.
>>
> Okay, although I'm just asking about the SA JDI connectors here. We 
> just need to make sure that they build and I can't recall if they are 
> compiled against the JDI in the boot JDK or the jdk.jdi module. If the 
> former then we would only see issues with boot cycle builds.

I see now, thanks!
Will check what is needed for the SA JDI connectors and let you know.


Thanks,
Serguei

>
> -Alan.



More information about the jigsaw-dev mailing list