Name: tb29552 Date: 05/02/2001
The "lock" command throws UnsupportedOperationException when the
debugee VM does not implement support for dumping monitor information
for an object.
Compare the output generated by "lock":
main[2] locals
Method arguments:
args = instance of java.lang.String[0] (id=243)
Local variables:
my = instance of JDBStackFrameBug(id=244)
localVar = "Hello"
main[2] lock my
Monitor information for instance of JDBStackFrameBug(id=244):
java.lang.UnsupportedOperationException
at
com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:41)
at
com.sun.tools.jdi.ObjectReferenceImpl.jdwpMonitorInfo(ObjectReferenceImpl.java:483)
at
com.sun.tools.jdi.ObjectReferenceImpl.owningThread(ObjectReferenceImpl.java:494)
at
com.sun.tools.example.debug.tty.Commands.doLock(Commands.java:1483)
at
com.sun.tools.example.debug.tty.Commands$5.action(Commands.java:1510)
at com.sun.tools.example.debug.tty.Commands$1.run(Commands.java:65)
To the output when I do a "threadlocks":
main[2] threadlocks
Monitor information for thread main:
Command 'threadlocks' is not supported on the target VM
======================================================================