JDB supporting reverse watchpoint (jdb-rw)

Last modified: 2003/08/21 15:17:35

Japanese is here.


Our JDB, jdb-rw, supports reverse watchpoint. The implemented commands are the same as ones of gdb-wrapper.pl of gcc-pg2, except two points: (1) restarting a debuggee occurs only if it needs, (2) jdb-rw caches the positions in pass 1 of revwatch.


How to use

  1. Download BCEL. The latest version is v5.1/bcel-5.1.tar.gz at Aug., 2003.
  2. Download jdb-rw.jar (about 150kB).
  3. Convert a program to be debugged, debuggee, in order to add the timestamp system. Please change the path of tools.jar properly.
    java -classpath jdb-rw.jar:bcel-5.1.jar:/usr/java/j2sdk1.4.2/lib/tools.jar Convert debuggee.class
  4. Invoke jdb-rw. Note that jdb-rw.jar must be on the left of tools.jar.
    java -classpath jdb-rw.jar:/usr/java/j2sdk1.4.2/lib/tools.jar com.sun.tools.example.debug.tty.TTY debuggee args...

Commands of jdb-rw

Mark a position. With no arguments, print the list of marked positions.
mark [<timestamp> [<ClassID:LineNum>]]
Unmark a marked position. The argument is the number of the position.
unmark [<PosNum>]
Move the control point of the debuggee to a designated position. If the position is prior to the current one, it will be restarted. The argument is the number of the position.
jump [<PosNum>]
Move the control point to the last position where a designated field was assigned. The argument is the same as one of normal "watch" command.
revwatch <ClassID.FieldName>

Known bugs

Future work

Kazutaka Maruyama <kazutaka_(!!at-mark!!)_sanpo-lab.jp> (anti-spammed)