I'm proposing the implementation of debugg

Project:JNode Core
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I'm proposing the implementation of debugging support in JNode.

The pupose of debugging support is to allow mainstream JPDA (Java Platform Debugger Architecture) compliant IDEs and debuggers to connect to JNode in order to debug various components of JNode as well as other programs running under JNode, largely easing the work of JNode developers.

Though this is a large task that requires significat effort its benefits for JNode development are indisputable.

In the current situation the remote debugging support looks more suitable for JNode because in this case the deubbger itself runs outside of JNode and can be your prefered IDE under your prefered operation system.

Below is the figure of JPDA in a remote debugger configuration:

.........................................................................................................................
........................................|.......JDWP.......|.......................................................
.......VM === JVMTI - - | - - - - - - - - - | - - JDI === IDE Debugger......
......Back end - JNode..|......Network...|....Front end - Client JVM............
..........................................................................................................................

JVMTI - Java Virtual Machine Tool Interface
JWDP - Java Debuger Wire Protocol
JDI - Java Debugger Interface

The JVMTI describes the functionality provided by the JVM in order to allow the debugging and profiling of the applications running in it. JVMTI is defined in terms of the C language, therefore it needes to be adapted it to JNode and the Java language.

The JDI is the high level debugger interface defined in Java language, directly used by the debugger application. JDI is provided by an external JVM and is outside of the scope of this proposal.

The JDWP describes the format of degugger information and requests-repsonses between the debuggee and the debugger in a transport agnostic way. JNode needs the backend support for this protocol, to recieve debugger commands and send the corresponding replies for them over the network.

In more concrete terms JNode needs to be extended with the following features:

1. Support for the JDWP transport which in this case is a server socket that accpets incomming connections from debugger clients.

2. A command interpreter for the JDWP commands and the implementation of the data structures to support the JDWP replies wich contain informtion about the general capabilities of the JVM and the internal state of the JVM as well as of the programs running in it.

3. Various extensions to the internals of the JVM like memory manager, compiler, scheduler etc. to provide the necessary functionality to the command interpreter for the execution of the incoming commands and the construction of the data structures needed for the replies.

This is a large task wich needs the collaboration of several contibutors wroking on the networking, various parts of the VM and the new components described by this proposal.

For more detailed information and the speficitaion of JPDA, JDWP and JVMTI see:

Java Platform Debugger Architecture (JPDA)

Regards,
Levente Sántha