[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] [RFA/JDWP] ClassTypeCommandSet
From: |
Aaron Luchko |
Subject: |
Re: [cp-patches] [RFA/JDWP] ClassTypeCommandSet |
Date: |
Wed, 10 Aug 2005 15:56:44 -0400 |
On Thu, 2005-08-04 at 18:31 -0400, Aaron Luchko wrote:
> On Thu, 2005-08-04 at 18:22 -0400, Bryce McKinlay wrote:
> > Aaron Luchko wrote:
> >
> > >+ try
> > >+ {
> > >+ if ((invokeOpts &
> > >JdwpConstants.InvokeOptions.INVOKE_SINGLE_THREADED)
> > >+ != 0)
> > >+ {
> > >+ // We must suspend all running threads first
> > >+ suspendSuccess =
> > >vm.suspendAllThreadsExcept(Thread.currentThread().
> > >+
> > >getThreadGroup());
> > >+ }
> > >+ return vm.executeMethod(null, thread, clazz, method, values,
> > >+ false);
> > >+ }
> > >+ catch (Exception ex)
> > >+ {
> > >+ if (suspendSuccess)
> > >+ { // We must first resume the suspended threads
> > >+
> > >vm.resumeAllThreadsExcept(Thread.currentThread().getThreadGroup());
> > >+ }
> > >
> > >
> >
> > What happens if some threads are already suspended by the debugger?
> > Looks like this would resume them which wouldn't be the expected behaviour.
>
> If a thread must be resumed as many times as it's been suspended in
> order to resume fully, this is the behavior of resumeAllThreadsExcept.
>
> However you did bring to my attention an error I made in this patch
> where I don't resume the suspended threads if the execution was
> successful.
I committed this patch to head.
thanks,
Aaron