Changes between Version 2 and Version 3 of CompilingAndDebugging


Ignore:
Timestamp:
04/29/10 09:39:05 (14 years ago)
Author:
Mark Evenson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CompilingAndDebugging

    v2 v3  
    77When running the Ant target ''abcl.debug.jpda'', a JVM is started waiting for a JDB (java debugger) to attach. On Windows (with the JDK 1.5.0_16) I need to run this command (in a different window) to attach to the session:
    88
     9{{{
    910  $ %JDKPATH%\jdb -connect com.sun.jdi.SocketAttach:port=6789
     11}}}
    1012
    1113After that, you have (command line) access to the JVM in which ABCL is running.
    1214
     15== Using JDWP ==
     16
     17One can use the JDWP connection to debug the JVM image with a graphical debugger such as Netbeans. 
     18
     19The JVM has to be started with the correct options, which is easy to build into the ABCL wrapper by placing the following in the abcl.properties file:
     20
     21{{{
     22java.options=-agentlib:jdwp=transport=dt_socket,address=6789,server=y
     23}}}
     24
     25Now, the JVM can be attached to when you wish to debug it by the "Debug >> Attach Debugger" menu options on Netbeans.  If you have the abcl project open, you have a full source debugging environnment, including the ability to make Java code changes, and dynamically insert them into the running image without restarting the process.
    1326== Analyzing compiler output ==
    1427