Tools: Debugging Native and Java Code with WDB

Page 20
Tools for
Debugging
© 2001 Hewlett-Packard Company
gdb
Starting Java from gdb:
DEBUG_PROG
Built-in mechanism available in .java_wrapper for 1.3.1
Set DEBUG_PROG in your shell:
export DEBUG_PROG=/opt/langtools/bin/gdb
export GDB_JAVA_UNWINDLIB=/tmp/libjunwind.sl
Problem using arguments to the java command
You need to remove arguments else you get:
/opt/langtools/bin/gdb: unrecognized option ‘-
Xmn500m’
Proceed as with modified .java_wrapper method
Type in all of the arguments:
(gdb) r -Xmn500m -Xms1024m -Xmx1024m
COM.volano.Mark -port 8000 -count 5000 -rooms 5
Can be cumbersome with large numbers of arguments
Alternatively, use the “set args” feature in your ~/.gdbinit file