> On Apr 20, 2017, at 12:37 AM, Magnus Ihse Bursie > <magnus.ihse.bur...@oracle.com> wrote: > > On 2017-04-20 01:11, Mandy Chung wrote: >>> On Apr 19, 2017, at 3:54 PM, Mandy Chung <mandy.ch...@oracle.com> wrote: >>> >>> >>>> On Apr 19, 2017, at 5:36 AM, Magnus Ihse Bursie wrote: >>>> >>>> WebRev: >>>> http://cr.openjdk.java.net/~ihse/JDK-8178038-javadoc-specs/webrev.01 >>> 368 JDWP_PROTOCOL := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html >> One more thing: jdwp-protocol belongs to jdk.jdwp.agent module. >> It would be nice if Gensrc-jdk.jdi.gmk can be cleaned up. > I agree that it would be nice if Gensrc-jdk.jdi.gmk can be cleaned up. > Unfortunately it's a bit tangled up right now, and a proper solution might be > too radical for this change. But let's see if we can sort this out, perhaps > with your module expertise a solution is possible. > > We need to gensrc three files: > 1) $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h > 2) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java > 3) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html > > 1 and 2 are being created by the same call to the build tool, and 3 is > created by a separate call. I'm not sure if this is possible to change. It > looks like it might. > > 1 already belongs to jdk.jdwp.agent, and 3 could easily be moved there. The > problem is 2, which is needed when compiling the jdk.jdi module. > > I have two suggestions, but I don't know if either of them is possible: > 1) Move the JDWP.java file to jdk.jdwp.agent, and make sure it's properly > exported from jdk.jdwp.agent to jdk.jdi. (From my point of view, this seems > like the logical thing to do.) In this case, the entire gensrc:ing could move > to jdk.jdwp.agent, and possibly even into a single call to the build tool to > generate all three files. >
As Alan said, JDWP.java is part of jdk.jdi. No need to be moved. > 2) Split the gensrc into one for jdk.jdwp.agent that generated 1 and 3, and > one for jdk.jdi that generates 2. It might require us to generate a dummy 2 > and 1 that are just thrown away, if the tool cannot be told not to generate > both 1 and 2 at the same time. I checked that build.tool.jdwpgen.Main can be invoked with -doc option only to generate 2 and it can be invoked separately with -include option to generate 1. Moving 1 and 3 to Gensrc-jdk.jdwp.agent.gmk seems like would work without change to the jdwpgen tool. Mandy