8025139: javac patch for using bootstrap compiler for debugging is not working properly
authorvromero
Thu, 26 Sep 2013 19:06:09 +0100
changeset 20266 d5e2fc28504e
parent 20265 8bd6f1a9ac24
child 20267 1511efc930be
8025139: javac patch for using bootstrap compiler for debugging is not working properly Reviewed-by: jjg
langtools/make/netbeans/langtools/build.xml
langtools/make/tools/anttasks/SelectToolTask.java
--- a/langtools/make/netbeans/langtools/build.xml	Thu Sep 26 20:07:43 2013 +0200
+++ b/langtools/make/netbeans/langtools/build.xml	Thu Sep 26 19:06:09 2013 +0100
@@ -55,18 +55,17 @@
         description="Build one or all langtools tools"
         />
 
-    <condition property="bootstrap" value="bootstrap-" else="">
+    <condition property="use_bootstrap" value="bootstrap-" else="">
         <isset property="langtools.tool.bootstrap"/>
     </condition>
-
-    <condition property="bcp" value="${build.bootstrap.dir}/classes" else="${build.classes.dir}">
+    <condition property="with_bootclasspath" value="${build.bootstrap.dir}/classes" else="${build.classes.dir}">
         <isset property="langtools.tool.bootstrap"/>
     </condition>
 
     <target name="-build-tool" if="langtools.tool.name">
-        <echo level="info" message="Building ${bootstrap}${langtools.tool.name}"/>
+        <echo level="info" message="Building ${use_bootstrap}${langtools.tool.name}"/>
         <echo level="verbose" message="(Unset langtools.tool.name to build all tools)"/>
-        <antcall target="build-${bootstrap}${langtools.tool.name}"/>
+        <antcall target="build-${use_bootstrap}${langtools.tool.name}"/>
     </target>
 
     <target name="-build-all" unless="langtools.tool.name">
@@ -97,9 +96,9 @@
 
     <target name="run" depends="-check-target.java.home,build,-def-run,-get-tool-and-args"
             description="run tool">
-        <echo level="info" message="${bcp}"/>
-        <echo level="info" message="Run ${bootstrap}${langtools.tool.name} with args ${langtools.tool.args}"/>
-        <run bcp="${bcp}" mainclass="com.sun.tools.${langtools.tool.name}.Main" args="${langtools.tool.args}"/>
+        <echo level="info" message="${with_bootclasspath}"/>
+        <echo level="info" message="Run ${use_bootstrap}${langtools.tool.name} with args ${langtools.tool.args}"/>
+        <run bcp="${with_bootclasspath}" mainclass="com.sun.tools.${langtools.tool.name}.Main" args="${langtools.tool.args}"/>
     </target>
 
     <!-- Run a selected class. (action: run.single;  shift-F6) -->
@@ -145,9 +144,9 @@
     <!-- Debug tool in NetBeans. -->
 
     <target name="debug" depends="-check-target.java.home,-def-run,-def-start-debugger,-get-tool-and-args,build" if="netbeans.home">
-        <echo level="info" message="Debug ${boostrap}${langtools.tool.name} with args ${langtools.tool.args}"/>
+        <echo level="info" message="Debug ${use_bootstrap}${langtools.tool.name} with args ${langtools.tool.args}"/>
         <start-debugger/>
-        <run bcp="${bcp}" mainclass="com.sun.tools.${langtools.tool.name}.Main" args="${langtools.tool.args}" jpda.jvmargs="${jpda.jvmargs}"/>
+        <run bcp="${with_bootclasspath}" mainclass="com.sun.tools.${langtools.tool.name}.Main" args="${langtools.tool.args}" jpda.jvmargs="${jpda.jvmargs}"/>
     </target>
 
     <!-- Debug a selected class . -->
@@ -237,12 +236,12 @@
         <macrodef name="run">
             <attribute name="mainclass"/>
             <attribute name="args" default=""/>
-            <attribute name="bcp" default="${build.classes.dir}"/>
+            <attribute name="bcp" default="${with_bootclasspath}"/>
             <attribute name="jpda.jvmargs" default=""/>
 
             <sequential>
                 <java fork="true" jvm="${target.java}" classname="@{mainclass}">
-                    <jvmarg line="-Xbootclasspath/p:${bcp}"/>
+                    <jvmarg line="-Xbootclasspath/p:@{bcp}"/>
                     <jvmarg line="@{jpda.jvmargs}"/>
                     <arg line="@{args}"/>
                 </java>
--- a/langtools/make/tools/anttasks/SelectToolTask.java	Thu Sep 26 20:07:43 2013 +0200
+++ b/langtools/make/tools/anttasks/SelectToolTask.java	Thu Sep 26 19:06:09 2013 +0100
@@ -87,8 +87,9 @@
             this(toolName, false);
         }
 
-        ToolChoices(String toolName, boolean boostrap) {
+        ToolChoices(String toolName, boolean bootstrap) {
             this.toolName = toolName;
+            this.bootstrap = bootstrap;
         }
 
         @Override