Thursday, June 5, 2008

Debugging Jato

In last few weeks , while working on arraylength bytecode instruction , I had to debug Jato . But instruction provided in readme file is rather obsolete . So I had to go through the and ''reinvent the wheel" .

To debug , you have to point gnu.classpath.boot.library.path to <gnu_classpath_root>/lib/classpath and bootclasspath should contain <gnu_classpath_root>/share/classpath/ and <jato_root>/lib/

The easiest way to do so is , setting the following values




then applying usual gdb command ,i.e.,

gdb --args <JATO_ROOT>/java \
-Dgnu.classpath.boot.library.path=:$GNU_CLASSPATH_ROOT/lib/classpath \
-Xbootclasspath:$BOOTCLASSPATH -cp <JATO_ROOT>/regression class_file_name_to_debug

will launch it in debug mode. You can additionally pass any other command line option ( -Xint , -Xtrace:jit ... ) also.

No comments: