[DGD] Java or LPC (DGD)?

Felix A. Croes felix at dworkin.nl
Sun Aug 17 14:59:39 CEST 2003


Tavis Elliott <tavise at nwlink.com> wrote:

> To weigh in on the bytecode update issue (Java has also been my primary 
> development language for quite some time) ... I would advise checking into 
> the JDI interface for Java 1.4, there are mechanisms for runtime 
> replacement of bytecodes that don't require horrendous fancy ClassLoader 
> schemes.  Granted they are 'debug' interfaces, and there are still 
> questions about introducing runtime problems, but they are easier than some 
> of the solutions already discussed.

The JDI itself is pure Java, but the way it works isn't.

Sun's Java VM defines a debugger interface called JVMDI.  This is a
C-level interface.  When using JDI to debug, you communicate with a
backend which interfaces with JVMDI -- and which therefore is written
in C.

The JVM which the JDI executes on is distinct from the JVM that you are
debugging.  And the JVMDI interface is optional -- JVMs are not required
to implement it.

If we are going to make comparisions on this level, I request that I
be allowed to run one DGD process within gdb, communicating through a
C backend with another DGD process :)  Still, the JVMDI interface
<does> include a RedefineClasses function which performs exactly
the upgrade function that was being discussed.  At the JDI level,
the method is called redefineClasses().  The documentation is at

    http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdi/com/sun/jdi/VirtualMachine.html#redefineClasses(java.util.Map)

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list