public void initExecutionStacks(ThreadReferenceProxyImpl newThread) {
   DebuggerManagerThreadImpl.assertIsManagerThread();
   myThread = newThread;
   if (newThread != null) {
     myActiveExecutionStack = new JavaExecutionStack(newThread, myDebugProcess, true);
   }
 }
 DebuggerContextImpl getFrameDebuggerContext() {
   DebuggerManagerThreadImpl.assertIsManagerThread();
   DebuggerContextImpl context = myDebugProcess.getDebuggerContext();
   if (context.getFrameProxy() != getStackFrameProxy()) {
     SuspendContextImpl threadSuspendContext =
         SuspendManagerUtil.getSuspendContextForThread(
             context.getSuspendContext(), getStackFrameProxy().threadProxy());
     context =
         DebuggerContextImpl.createDebuggerContext(
             myDebugProcess.mySession,
             threadSuspendContext,
             getStackFrameProxy().threadProxy(),
             getStackFrameProxy());
     context.setPositionCache(myDescriptor.getSourcePosition());
     context.initCaches();
   }
   return context;
 }
  protected void resume() {
    assertNotResumed();
    DebuggerManagerThreadImpl.assertIsManagerThread();
    try {
      if (!Patches.IBM_JDK_DISABLE_COLLECTION_BUG) {
        for (ObjectReference objectReference : myKeptReferences) {
          DebuggerUtilsEx.enableCollection(objectReference);
        }
        myKeptReferences.clear();
      }

      for (SuspendContextCommandImpl cmd = pollPostponedCommand();
          cmd != null;
          cmd = pollPostponedCommand()) {
        cmd.notifyCancelled();
      }

      resumeImpl();
    } finally {
      myIsResumed = true;
    }
  }
Пример #4
0
  @NotNull
  public static List<Pair<Breakpoint, Event>> getEventDescriptors(
      SuspendContextImpl suspendContext) {
    DebuggerManagerThreadImpl.assertIsManagerThread();
    if (suspendContext == null) {
      return Collections.emptyList();
    }
    final EventSet events = suspendContext.getEventSet();
    if (events == null) {
      return Collections.emptyList();
    }
    final List<Pair<Breakpoint, Event>> eventDescriptors = new SmartList<Pair<Breakpoint, Event>>();

    final RequestManagerImpl requestManager = suspendContext.getDebugProcess().getRequestsManager();
    for (final Event event : events) {
      final Requestor requestor = requestManager.findRequestor(event.request());
      if (requestor instanceof Breakpoint) {
        eventDescriptors.add(Pair.create((Breakpoint) requestor, event));
      }
    }
    return eventDescriptors;
  }
 @Override
 public boolean isDebuggerManagerThread() {
   return DebuggerManagerThreadImpl.isManagerThread();
 }