[armedbear-cvs] r14165 - trunk/abcl

mevenson at common-lisp.net mevenson at common-lisp.net
Fri Oct 5 15:20:59 UTC 2012


Author: mevenson
Date: Fri Oct  5 08:20:57 2012
New Revision: 14165

Log:
Ant target to 'abcl.compile.lisp.debug' via JDWP.

With this target, he Lisp compilation is invoked with the contents of
the JVM property "abcl.compile.lisp.debug.jvmarg".  The default value
of this property suspends the JVM at the start of the compilation,
listening on port 6789.

Modified:
   trunk/abcl/abcl.properties.in
   trunk/abcl/build.xml

Modified: trunk/abcl/abcl.properties.in
==============================================================================
--- trunk/abcl/abcl.properties.in	Thu Oct  4 11:57:54 2012	(r14164)
+++ trunk/abcl/abcl.properties.in	Fri Oct  5 08:20:57 2012	(r14165)
@@ -2,23 +2,19 @@
 
 # XXX should be called 'build.properties' but this collides with its usage by the Eclipe IDE
 
-# Template for settings the Ant based build process.
-
+# Template for Ant based build process settings.
 
 # Attempt to perform incremental compilation? 
 #abcl.build.incremental=true
 
-# skips the compilation of Lisp sources in Netbeans 
-# (for debugging compiler-pass1.lisp and subsequent passes)
-#abcl.compile.lisp.skip=true
+# Additional site specific startup code to be merged in 'system.lisp' at build time
+#abcl.startup.file=${basedir}/startup.lisp
 
 # java.options sets the Java options in the abcl wrapper scripts
 #
 # See
 # http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
-# for options for the Oracle HotSpot JVM
-
-# HotSpot Examples:
+# for options for the Oracle HotSpot JVM.
 
 # Java7 on 64bit optimizations
 #java.options=-d64 -Xmx16g -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2g
@@ -26,7 +22,7 @@
 # Set the JVM to use a maximum of 1GB of RAM (only works for 64bit JVMs)
 #java.options=-d64 -Xmx1g
 
-# Use the G1 garbage collector stablized with jdk1.7.0_04
+# Use the G1 garbage collector stablized with jdk1.7.0_04, printing GC details
 #java.options=-d64 -Xmx4g -XX:+PrintGCDetails -XX:+UseG1GC 
 
 # Use a separate concurrent GC thread (java-1.6_14 or later)
@@ -43,5 +39,13 @@
 # Enable assertions specified via the JVM contract
 #java.options=-ea
 
-# Additional site specific startup code to be merged in 'system.lisp' at build time
-#abcl.startup.file=${basedir}/startup.lisp
+## ABCL Development
+
+# skips the compilation of Lisp sources in Netbeans 
+# (for debugging compiler-pass1.lisp and subsequent passes)
+#abcl.compile.lisp.skip=true
+
+# JVM option to execute when debugging the Lisp compilation via 'abcl.compile.lisp.debug'
+#abcl.compile.lisp.debug.jvmarg=-agentlib:jdwp=transport=dt_socket,server=y,address=6789,suspend=y
+
+

Modified: trunk/abcl/build.xml
==============================================================================
--- trunk/abcl/build.xml	Thu Oct  4 11:57:54 2012	(r14164)
+++ trunk/abcl/build.xml	Fri Oct  5 08:20:57 2012	(r14165)
@@ -81,7 +81,7 @@
     </patternset>
 
     <patternset id="abcl.objects">
-      <!-- "system.lisp" is dynamically created by COMPILE-SYSTEM -->
+      <!-- "system.lisp" is dynamically created by COMPILE-fSYSTEM -->
       <include name="org/armedbear/lisp/system.lisp"/> 
       <include name="org/armedbear/lisp/**/*.class"/>
       <include name="org/armedbear/lisp/**/*.cls"/> 
@@ -232,11 +232,17 @@
 
     <property name="system.lisp.file" 
               value="${build.classes.dir}/org/armedbear/lisp/system.lisp"/>
-    
+
     <target name="abcl.compile.lisp" 
             depends="abcl.copy.lisp,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate"
             unless="abcl.fasls.uptodate.p">
-      <echo>
+      <abcl.compile.lisp/>
+    </target>
+
+    <macrodef name="abcl.compile.lisp">
+      <element name="additional.jvmarg" optional="true"/>
+      <sequential>
+        <echo>
 Compiling Lisp system 
 from ${abcl.home.dir}
  to  ${abcl.lisp.output}</echo>
@@ -252,6 +258,7 @@
             classname="org.armedbear.lisp.Main">
         <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/>
         <jvmarg value="-Dabcl.autoload.verbose=Y"/>
+        <additional.jvmarg/>
         <arg value="--noinit"/>
         <arg value="--nosystem"/>
         <arg value="--eval"/>
@@ -260,6 +267,20 @@
       <concat destfile="${system.lisp.file}" append="true">
         <fileset file="${abcl.startup.file}"/>
       </concat>
+        </sequential>
+    </macrodef>
+
+    <property name="abcl.compile.lisp.debug.jvmarg"
+              value="-agentlib:jdwp=transport=dt_socket,server=y,address=6789,suspend=y"/>
+    <target name="abcl.compile.lisp.debug" 
+            depends="abcl.copy.lisp,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate"
+            unless="abcl.fasls.uptodate.p">
+      <echo>Debugging with jvmarg ${abcl.compile.lisp.debug.jvmarg}</echo>
+      <abcl.compile.lisp> 
+          <additional.jvmarg>
+            <jvmarg value="${abcl.compile.lisp.debug.jvmarg}"/>
+          </additional.jvmarg>
+      </abcl.compile.lisp>
     </target>
 
     <property name="abcl.build.path"




More information about the armedbear-cvs mailing list