There is a limited amount of C code used to start Jikes RVM. The rvm script will start Jikes RVM using GDB (the GNU debugger) if the first argument is
-gdb. Break points can be set in the C code, variables, registers can be expected in the C code.
rvm -gdb <RVM args> <name of Java application> <application args>
The dynamically created Java code doesn't provide GDB with the necessary symbol information for debugging. As some of the Java code is created in the boot image, it is possible to find the location of some Java methods and to break upon them. To determine the location use the RVM.map file. A script to enable use of the RVM.map as debugger information inside GDB is provided here.
Other tools, such as valgrind, are occasionally useful in debugging or understanding the behaviour of JikesRVM. The rvm script facilitates using these tools with the '-wrap' argument.
rvm -wrap "<wrapper-script-and-args>" <rest of command line>
For example, cachegrind can be invoked by
rvm -wrap "/path/to/valgrind --tool=cachegrind" <java-command-line>
The command and arguments immediately after the -wrap argument will be inserted into the script on the command line that invokes the boot image runner. One useful variant is
rvm -wrap echo <rest of command line>
Jikes has an interactive debugger that you can invoke by sending SIGQUIT to Jikes while it's running: