/[classpath]/classpath/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
ViewVC logotype

Diff of /classpath/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by keiths, Thu Aug 25 22:09:49 2005 UTC revision 1.4 by keiths, Fri Sep 2 20:48:25 2005 UTC
# Line 41  exception statement from your version. * Line 41  exception statement from your version. *
41  package gnu.classpath.jdwp.processor;  package gnu.classpath.jdwp.processor;
42    
43  import gnu.classpath.jdwp.JdwpConstants;  import gnu.classpath.jdwp.JdwpConstants;
44    import gnu.classpath.jdwp.VMVirtualMachine;
45  import gnu.classpath.jdwp.exception.InvalidFieldException;  import gnu.classpath.jdwp.exception.InvalidFieldException;
46  import gnu.classpath.jdwp.exception.JdwpException;  import gnu.classpath.jdwp.exception.JdwpException;
47  import gnu.classpath.jdwp.exception.JdwpInternalErrorException;  import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
# Line 188  public class ClassTypeCommandSet Line 189  public class ClassTypeCommandSet
189        {        {
190          values[i] = Value.getObj(bb);          values[i] = Value.getObj(bb);
191        }        }
192      boolean suspendSuccess = false;  
193      int invokeOpts = bb.getInt();      int invokeOpts = bb.getInt();
194        boolean suspend = ((invokeOpts
195                            & JdwpConstants.InvokeOptions.INVOKE_SINGLE_THREADED)
196                           != 0);
197      try      try
198        {        {
199          if ((invokeOpts & JdwpConstants.InvokeOptions.INVOKE_SINGLE_THREADED)          if (suspend)
200              != 0)            VMVirtualMachine.suspendAllThreads ();
201            {  
202              // We must suspend all running threads first          MethodResult mr = VMVirtualMachine.executeMethod(null, thread,
203              suspendSuccess = vm.suspendAllThreadsExcept(Thread.currentThread().                                                           clazz, method,
204                                                            getThreadGroup());                                                           values, false);
205            }          if (suspend)
206          MethodResult mr = vm.executeMethod(null, thread, clazz, method, values,            VMVirtualMachine.resumeAllThreads ();
207                                             false);  
         if (suspendSuccess)  
           { // We must call resume if we suspended threads  
             suspendSuccess = false;  
             vm.resumeAllThreadsExcept(Thread.currentThread().getThreadGroup());  
           }  
208          return mr;          return mr;
209        }        }
210      catch (Exception ex)      catch (Exception ex)
211        {        {
212          if (suspendSuccess)          if (suspend)
213            { // We must call resume if we suspended threads            VMVirtualMachine.resumeAllThreads ();
214              vm.resumeAllThreadsExcept(Thread.currentThread().getThreadGroup());  
           }  
215          throw new JdwpInternalErrorException(ex);          throw new JdwpInternalErrorException(ex);
216        }        }
217    }    }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26