当前位置: 首页>>代码示例>>Java>>正文


Java ThreadStartRequest类代码示例

本文整理汇总了Java中com.sun.jdi.request.ThreadStartRequest的典型用法代码示例。如果您正苦于以下问题:Java ThreadStartRequest类的具体用法?Java ThreadStartRequest怎么用?Java ThreadStartRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ThreadStartRequest类属于com.sun.jdi.request包,在下文中一共展示了ThreadStartRequest类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setEventRequests

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
private void setEventRequests(VirtualMachine vm) {
    EventRequestManager erm = vm.eventRequestManager();

    // Normally, we want all uncaught exceptions.  We request them
    // via the same mechanism as Commands.commandCatchException()
    // so the user can ignore them later if they are not
    // interested.
    // FIXME: this works but generates spurious messages on stdout
    //        during startup:
    //          Set uncaught java.lang.Throwable
    //          Set deferred uncaught java.lang.Throwable
    Commands evaluator = new Commands();
    evaluator.commandCatchException
        (new StringTokenizer("uncaught java.lang.Throwable"));

    ThreadStartRequest tsr = erm.createThreadStartRequest();
    tsr.enable();
    ThreadDeathRequest tdr = erm.createThreadDeathRequest();
    tdr.enable();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:VMConnection.java

示例2: setEventRequests

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
private void setEventRequests(VirtualMachine vm) {
    EventRequestManager erm = vm.eventRequestManager();

    // Normally, we want all uncaught exceptions.  We request them
    // via the same mechanism as Commands.commandCatchException()
    // so the user can ignore them later if they are not
    // interested.
    // FIXME: this works but generates spurious messages on stdout
    //        during startup:
    //          Set uncaught java.lang.Throwable
    //          Set deferred uncaught java.lang.Throwable
    Commands evaluator = new Commands(env);
    evaluator.commandCatchException
        (new StringTokenizer("uncaught java.lang.Throwable"));

    ThreadStartRequest tsr = erm.createThreadStartRequest();
    tsr.enable();
    ThreadDeathRequest tdr = erm.createThreadDeathRequest();
    tdr.enable();
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:21,代码来源:VMConnection.java

示例3: createEventRequest

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
@Override
protected EventRequest createEventRequest(EventRequest oldRequest) throws VMDisconnectedExceptionWrapper, InternalExceptionWrapper {
    if (oldRequest instanceof ThreadStartRequest) {
        return EventRequestManagerWrapper.createThreadStartRequest(getEventRequestManager());
    }
    if (oldRequest instanceof ThreadDeathRequest) {
        return EventRequestManagerWrapper.createThreadDeathRequest(getEventRequestManager());
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:ThreadBreakpointImpl.java

示例4: vmAttached

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
private void vmAttached() {
  DebuggerManagerThreadImpl.assertIsManagerThread();
  LOG.assertTrue(!isAttached());
  if(myState.compareAndSet(STATE_INITIAL, STATE_ATTACHED)) {
    final VirtualMachineProxyImpl machineProxy = getVirtualMachineProxy();
    final EventRequestManager requestManager = machineProxy.eventRequestManager();

    if (machineProxy.canGetMethodReturnValues()) {
      myReturnValueWatcher = new MethodReturnValueWatcher(requestManager);
    }

    final ThreadStartRequest threadStartRequest = requestManager.createThreadStartRequest();
    threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
    threadStartRequest.enable();
    final ThreadDeathRequest threadDeathRequest = requestManager.createThreadDeathRequest();
    threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
    threadDeathRequest.enable();

    myDebugProcessDispatcher.getMulticaster().processAttached(this);

    // breakpoints should be initialized after all processAttached listeners work
    ApplicationManager.getApplication().runReadAction(new Runnable() {
      @Override
      public void run() {
        XDebugSession session = getSession().getXDebugSession();
        if (session != null) {
          session.initBreakpoints();
        }
      }
    });

    final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
    final String transportName = DebuggerBundle.getTransportName(getConnection());
    showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
    if (LOG.isDebugEnabled()) {
      LOG.debug("leave: processVMStartEvent()");
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:40,代码来源:DebugProcessEvents.java

示例5: wrapThreadStartRequests

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
public static List<ThreadStartRequest> wrapThreadStartRequests(
        F3VirtualMachine f3vm, List<ThreadStartRequest> reqs) {
    if (reqs == null) {
        return null;
    }
    List<ThreadStartRequest> result = new ArrayList<ThreadStartRequest>();
    for (ThreadStartRequest req : reqs) {
        result.add(wrap(f3vm, req));
    }
    return result;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:12,代码来源:F3EventRequest.java

示例6: init

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void init(String[] args) throws Exception {
    /*
     * TODO As currently jdb just supports "jdb -attach [port]" command, 
     * more work to do to parse the jdb launching command option
     */
    if (args.length >= 2 && args[0].equals("-attach")) {
        SocketAttachingConnectorImpl sac = 
            new SocketAttachingConnectorImpl(
                    (VirtualMachineManagerImpl) Bootstrap.
                    virtualMachineManager());
        Map argMap = sac.defaultArguments();
        Connector.Argument value;
        value = (Connector.Argument) argMap.get("hostname");
        value.setValue("localhost");
        value = (Connector.Argument) argMap.get("port");
        value.setValue(args[1]);
        debuggee = sac.attach(argMap);
        //VMProcess = debuggee.process();
    } else {
        System.out.println("Wrong command option. " +
                "The jdb currently only support jdb -attach [port].");
        System.exit(0);
    }
    
    eventRequestManager = debuggee.eventRequestManager();
    
    // Enable class prepare request for all classes
    ClassPrepareRequest classPrepareRequest 
        = eventRequestManager.createClassPrepareRequest();
    classPrepareRequest.addClassFilter("*");
    classPrepareRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL);
    classPrepareRequest.enable();
    
    // Enable thread start request for all threads
    ThreadStartRequest threadStartRequest 
        = eventRequestManager.createThreadStartRequest();
    threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
    threadStartRequest.enable();
}
 
开发者ID:shannah,项目名称:cn1,代码行数:41,代码来源:Main.java

示例7: vmAttached

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
private void vmAttached() {
  DebuggerManagerThreadImpl.assertIsManagerThread();
  LOG.assertTrue(!isAttached());
  if(myState.compareAndSet(STATE_INITIAL, STATE_ATTACHED)) {
    final VirtualMachineProxyImpl machineProxy = getVirtualMachineProxy();
    final EventRequestManager requestManager = machineProxy.eventRequestManager();
    
    if (machineProxy.canGetMethodReturnValues()) {
      myReturnValueWatcher = new MethodReturnValueWatcher(requestManager);
    }

    final ThreadStartRequest threadStartRequest = requestManager.createThreadStartRequest();
    threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
    threadStartRequest.enable();
    final ThreadDeathRequest threadDeathRequest = requestManager.createThreadDeathRequest();
    threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
    threadDeathRequest.enable();

    DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().setInitialBreakpointsState();
    myDebugProcessDispatcher.getMulticaster().processAttached(this);

    final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
    final String transportName = DebuggerBundle.getTransportName(getConnection());
    showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
    if (LOG.isDebugEnabled()) {
      LOG.debug("leave: processVMStartEvent()");
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:DebugProcessEvents.java

示例8: createThreadStartRequest

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
public ThreadStartRequest createThreadStartRequest() {
    return new ThreadStartRequestImpl();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:EventRequestManagerImpl.java

示例9: threadStartRequests

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
public List<ThreadStartRequest> threadStartRequests() {
    return (List<ThreadStartRequest>)unmodifiableRequestList(JDWP.EventKind.THREAD_START);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:EventRequestManagerImpl.java

示例10: F3ThreadStartRequest

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
public F3ThreadStartRequest(F3VirtualMachine f3vm, ThreadStartRequest underlying) {
    super(f3vm, underlying);
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:4,代码来源:F3ThreadStartRequest.java

示例11: underlying

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
@Override
protected ThreadStartRequest underlying() {
    return (ThreadStartRequest) super.underlying();
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:5,代码来源:F3ThreadStartRequest.java

示例12: threadStartRequests

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
public List<ThreadStartRequest> threadStartRequests() {
    return F3EventRequest.wrapThreadStartRequests(virtualMachine(),
            underlying().threadStartRequests());
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:5,代码来源:F3EventRequestManager.java

示例13: wrap

import com.sun.jdi.request.ThreadStartRequest; //导入依赖的package包/类
public static F3EventRequest wrap(F3VirtualMachine f3vm, EventRequest req) {
    if (req == null) {
        return null;
    }

    if (req instanceof AccessWatchpointRequest) {
        return new F3AccessWatchpointRequest(f3vm, (AccessWatchpointRequest)req);
    } else if (req instanceof BreakpointRequest) {
        return new F3BreakpointRequest(f3vm, (BreakpointRequest)req);
    } else if (req instanceof ClassPrepareRequest) {
        return new F3ClassPrepareRequest(f3vm, (ClassPrepareRequest)req);
    } else if (req instanceof ClassUnloadRequest) {
        return new F3ClassUnloadRequest(f3vm, (ClassUnloadRequest)req);
    } else if (req instanceof ExceptionRequest) {
        return new F3ExceptionRequest(f3vm, (ExceptionRequest)req);
    } else if (req instanceof MethodEntryRequest) {
        return new F3MethodEntryRequest(f3vm, (MethodEntryRequest)req);
    } else if (req instanceof MethodExitRequest) {
        return new F3MethodExitRequest(f3vm, (MethodExitRequest)req);
    } else if (req instanceof ModificationWatchpointRequest) {
        return new F3ModificationWatchpointRequest(f3vm, (ModificationWatchpointRequest)req);
    } else if (req instanceof MonitorContendedEnterRequest) {
        return new F3MonitorContendedEnterRequest(f3vm, (MonitorContendedEnterRequest)req);
    } else if (req instanceof MonitorContendedEnteredRequest) {
        return new F3MonitorContendedEnteredRequest(f3vm, (MonitorContendedEnteredRequest)req);
    } else if (req instanceof MonitorWaitRequest) {
        return new F3MonitorWaitRequest(f3vm, (MonitorWaitRequest)req);
    } else if (req instanceof MonitorWaitedRequest) {
        return new F3MonitorWaitedRequest(f3vm, (MonitorWaitedRequest)req);
    } else if (req instanceof StepRequest) {
        return new F3StepRequest(f3vm, (StepRequest)req);
    } else if (req instanceof ThreadDeathRequest) {
        return new F3ThreadDeathRequest(f3vm, (ThreadDeathRequest)req);
    } else if (req instanceof ThreadStartRequest) {
        return new F3ThreadStartRequest(f3vm, (ThreadStartRequest)req);
    } else if (req instanceof VMDeathRequest) {
        return new F3VMDeathRequest(f3vm, (VMDeathRequest)req);
    } else if (req instanceof WatchpointRequest) {
        return new F3WatchpointRequest(f3vm, (WatchpointRequest)req);
    } else {
        return new F3EventRequest(f3vm, req);
    }
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:44,代码来源:F3EventRequest.java


注:本文中的com.sun.jdi.request.ThreadStartRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。