Method and product for debugging a target java virtual...

Data processing: software development – installation – and managem – Software program development tool – Testing or debugging

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C709S203000

Reexamination Certificate

active

06637024

ABSTRACT:

FIELD OF THE INVENTION
The invention pertains generally to debugging tools to support software applications for Java™ platforms and, more particularly, to a debugging method and computer program product for debugging a target Java virtual machine (VM) which does not include the usual debug symbol information required by the debug interface/debugging protocol of a Java virtual machine (such as the standard Java Debugging Wire Protocol (JDWP)).
BACKGROUND OF THE INVENTION
Software application development programs are typically equipped with debuggers (being a type of software tool) whose purpose it is to track for the user the execution steps taken when a target application program is run such that the debugger identifies the application program source or assembly code statements that have been executed during the debugging session, the values that have been assigned to variables at each step, etc. With the information generated by the debugger the user can more readily determine whether or not the application program ran as it was supposed to and, if not, identify the point in the application program which failed to properly execute as well as other execution tracking information such as the values of local variables, etc. For these reasons debugging tools are equally important for developing, testing and maintaining Java virtual machines and Java platforms comprising them as the application programs to be run on those platforms.
The remote (debugging of a Java virtual machine (VM) is typically done using the Java Debug Interface (JDI) application program interface (API) developed by Sun Microsystems, Inc. The JDI is a high-level Java programming language interface which includes support for remote debugging. The target virtual machine to be remotely debugged will also normally support the Java Virtual Machine Debug Interface (JVMDI) API which is a low-level native interface and defines the services a Java virtual machine must provide for debugging. Further, the underlying communications between a debugger and the virtual machine are typically done using the standard debug protocol developed for Java applications, known as the Java Debug Wire Protocol (JDWP), in which case the virtual machine only needs to know the JDWP which defines the format of information and requests transferred during the debugging process between the virtual machine and the debugger front-end.
According to the standard debug protocol (JDWP) it is assumed that the target virtual machine will have complete information about class names, field names, line number information for each method, local variables, etc. (this information usually being present in class files compiled to have debug information), and this assumption implies that the target virtual machine must comprise class files having as much debug information as possible. It also requires that the virtual machine be packaged without the removal of fully qualified names even if they are not needed (such as when, for instance, reflection is not used by the program).
The JDI, as specified by Sun Microsystems, supports both line and instruction-based stepping but the former, which is typically preferred by application developers, requires that a much greater amount of debug information, including line number tables, be made available. Line-based debug requests require the use of these line number tables to translate line-based requests into the corresponding instruction-based requests which are actually required by the virtual machine for execution. To provide for this translation the Java compiler provides a set of line number tables in the usual compiler-generated debug information and these tables generally make up a large percentage of the total size of the debug information. The information provided by these tables is used by the virtual machine to translate any line-based request received from the debugger to an instruction-based request. For example, two lines of a source code program which a debugger might step over could be: Line
1
: a=1+2 and Line
2
: a=a+1, whereas the virtual machine will actually execute the following four instruction-level step operations for each line instruction:
iconst1
iconst1
iconst2
iload1
iadd

Line 1
iadd

Line 2
istore1
istore1
C compilers which compile application programs produce both a “fat debug” image having all the required debug information and a “normal”, non-debug counterpart so that after the desired debugging has been completed the non-debug program, usually being smaller than the debug version, can instead be installed for use. However, this method is not suitable for embedded Java programs, representing a likely environment for Java virtual machines, because the target program would then have to contain all the necessary debug information in class files and this debug information may require substantial space (memory) which may not be available in the embedded environment. Well-designed embedded products are intentionally “right-sized” to consume all target platform resources and, thus, the inclusion of additional debug information in such a virtual machine will typically not work in a production system (i.e. either because there is no extra memory on which such extra information may reside or because the use of extra memory would impair program execution).
The present invention addresses and resolves the foregoing problem posed by the limited memory resources in the production environments of embedded virtual machines for which it may not be possible to include debug information in the virtual machine bytecodes.
SUMMARY OF THE INVENTION
In accordance with the present invention there is provided a method for debugging a virtual machine without need for the virtual machine to comprise debug information required by a debugger, the method being applied during communication of request packets between the debugger and the virtual machine during execution of the debugger, the method comprising the steps of receiving the request packets from the debugger prior to communication of the request packets to the virtual machine, processing the request packets whereby the required debug information is provided to predetermined packets thereof, transmitting the processed request packets for communication to the virtual machine, receiving reply packets from the virtual machine, processing the reply packets for reply to the debugger, and transmitting the processed reply packets to the debugger. The method may be further provided wherein the virtual machine is a target Java virtual machine. Also, the method may be further comprise the step of providing a proxy comprising the debug information separate from the virtual machine and for performing the processing, receiving and transmitting steps. Further, the preceding method may comprise as a preliminary step, the step of transferring the debug information from the virtual machine into the proxy. Or, the preceding method may further comprise as a preliminary step, the step of packaging an image of the virtual machine comprising the debug information and incorporating the image into the proxy. The method may also be provided wherein the debug information comprises line tables and the step of processing request packets comprises translating line-based request packets to instruction-based request packets. The method may also be provided wherein the format of the request packets is defined by the Java Debug Wire Protocol (JDWP). And the predetermined request packets may be those packets determined to require debug information in the proxy.
There is also provided a computer program product for use in debugging a virtual machine without need for the virtual machine to comprise debug information required by a debugger, the computer program product comprising the debug information, means for receiving request packets from the debugger prior to communication of the request packets to the virtual machine, means for processing the request packets whereby required debug information is provided to predetermined packets thereof, means for transmitting

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and product for debugging a target java virtual... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method and product for debugging a target java virtual..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and product for debugging a target java virtual... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3158617

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.