Menu

How to use the low level debugger interface

1. choose target method

A sample use of the debugger:

  • use bootclasspath to load elf4j.jar during boot
  • set gdb.elf.provider to provider implementation
  • set provider.tmp.dir to tmp dir
  • set methods.to.register to target methods, use "package.class.method.signature" to describe target methods. Better to use fuzzy matching, add "." to distinguish between methods with similar prefix or suffix. Don't put too much methods at a time, ulimit may not allow too many open files. If some method is not register in the call chain, the stack unwinding may not work properly.
Example: rvm -gdb -Xms180m -Xmx360m -Xbootclasspath/a:elf4j.jar -Dgdb.elf.provider=net.sourceforge.elf4j.providers.MRPProvider -Dprovider.tmp.dir=/tmp/rvm/ -Dmethods.to.register="org.jikesrvm.classloader.TableBasedDynamicLinker.,org.jikesrvm.runtime.DynamicLinker.,.JNIFunctions.,.ObjectInputStream.,.TestSerialization.,.ObjectAccessor." -cp . test.org.jikesrvm.basic.core.serialization.TestSerializatio

set break points

check stack, frame info

disassemble

step

print object info

print class info

print method info

print unicode string

print primary array

Posted by Da Feng 2011-10-29 | Draft

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.