Package com.sun.jdi

Examples of com.sun.jdi.ThreadReference


   * @see com.sun.jdi.ThreadGroupReference#suspend()
   */
  public void suspend() {
    Iterator<ThreadReference> iter = allThreads().iterator();
    while (iter.hasNext()) {
      ThreadReference thr = iter.next();
      thr.suspend();
    }
  }
View Full Code Here


    preserveStackFrames();
    // This method is called *before* the VM is actually resumed.
    // To ensure that all threads will fully resume when the VM
    // is resumed, make sure the suspend count of each thread
    // is no greater than 1. @see Bugs 23328 and 27622
    ThreadReference thread = fThread;
    try {
      while (thread.suspendCount() > 1) {
        thread.resume();
      }
    } catch (ObjectCollectedException e) {
    } catch (VMDisconnectedException e) {
      disconnected();
    } catch (RuntimeException e) {
View Full Code Here

      boolean suspendVote, EventSet eventSet) {
    if (event instanceof ClassPrepareEvent) {
      return handleClassPrepareEvent((ClassPrepareEvent) event, target,
          suspendVote);
    }
    ThreadReference threadRef = ((LocatableEvent) event).thread();
    JDIThread thread = target.findThread(threadRef);
    if (thread == null) {
      // wait for any thread start event sets to complete processing
      // see bug 271700
      try {
View Full Code Here

   * (com.sun.jdi.event.Event,
   * org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget, boolean)
   */
  public void eventSetComplete(Event event, JDIDebugTarget target,
      boolean suspend, EventSet eventSet) {
    ThreadReference threadRef = null;
    if (event instanceof ClassPrepareEvent) {
      threadRef = ((ClassPrepareEvent) event).thread();
    } else if (event instanceof LocatableEvent) {
      threadRef = ((LocatableEvent) event).thread();
    }
View Full Code Here

    try {
      List<ThreadReference> threads = fGroup.threads();
      List<JDIThread> modelThreads = new ArrayList<JDIThread>(threads.size());
      Iterator<ThreadReference> iterator = threads.iterator();
      while (iterator.hasNext()) {
        ThreadReference ref = iterator.next();
        JDIThread thread = getJavaDebugTarget().findThread(ref);
        if (thread != null) {
          modelThreads.add(thread);
        }
      }
View Full Code Here

    List<JDIThread> toRefresh = new ArrayList<JDIThread>();
    Iterator<JDIThread> iterator = getThreadIterator();
    while (iterator.hasNext()) {
      JDIThread thread = iterator.next();
      boolean modelSuspended = thread.isSuspended();
      ThreadReference reference = thread.getUnderlyingThread();
      try {
        boolean realSuspended = reference.isSuspended();
        if (realSuspended) {
          if (modelSuspended) {
            // Even if the model is suspended, it might be in a
            // different location so refresh
            toRefresh.add(thread);
View Full Code Here

   * @see org.eclipse.jdt.debug.core.IJavaObject#getOwningThread()
   */
  public IJavaThread getOwningThread() throws DebugException {
    IJavaThread owningThread = null;
    try {
      ThreadReference thread = getUnderlyingObject().owningThread();
      JDIDebugTarget debugTarget = (JDIDebugTarget) getDebugTarget();
      if (thread != null) {
        owningThread = debugTarget.findThread(thread);
      }
    } catch (IncompatibleThreadStateException e) {
View Full Code Here

TOP

Related Classes of com.sun.jdi.ThreadReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.