[cp-patches] [PATCH/JDWP] JDWP ThreadGroup thinkos

Keith Seitz keiths at redhat.com
Thu Mar 16 21:09:44 UTC 2006


This patch corrects two thinkos in VMVirtualMachine concerning thread 
suspension. First, the original code was using 
Thread.currentThread().getThreadGroup() as the JDWP thread group. This 
is obviously wrong in the case of event notifications, where the 
underlying executing thread is actually a user thread, not a JDWP 
thread. Second, we were always suspending the current thread. This 
should not be the case (once again) when the thread is part of the JDWP 
thread group, which it could be if the debugger requested the suspension 
of all threads.

The attached patch corrects these problems.

2006-03-16  Keith Seitz  <keiths at redhat.com>

	* gnu/classpath/jdwp/Jdwp.java (getJdwpThreadGroup): New method.
	* vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java
	(suspendAllThreads): Use Jdwp.getJdwpThreadGroup.
	Don't suspend the current thread unless it is not part of the
	JDWP thread group.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: threadgroup.patch
Type: text/x-patch
Size: 1649 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060316/fda4eb39/threadgroup.bin

More information about the Classpath-patches mailing list