Examples of eventRequestManager()


Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

    Process process = startSecondJVM(VMLocalTarget.class);
    sleep(90);
    // connect
    VirtualMachine vm = new VMAcquirer().connect(debugPort);

    ClassPrepareRequest createClassPrepareRequest = vm
        .eventRequestManager().createClassPrepareRequest();
    createClassPrepareRequest.addClassFilter(VMLocalTarget.class.getName());
    createClassPrepareRequest.enable();
   
    vm.resume();
View Full Code Here

Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

 
  public void tryCreateExceptionRequest(String className) {
    Debugger debugger = Debugger.getInstance();
    VirtualMachine vm = debugger.getVm();
    if (vm==null) return ;
    EventRequestManager erm = vm.eventRequestManager();
    if (erm == null) return;
   
    List<ReferenceType> refTypes = vm.classesByName(className);
    ExceptionRequest exReq = vm.eventRequestManager().createExceptionRequest(refTypes.get(0), true, true);
    exReq.setSuspendPolicy(ExceptionRequest.SUSPEND_EVENT_THREAD);
View Full Code Here

Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

    if (vm==null) return ;
    EventRequestManager erm = vm.eventRequestManager();
    if (erm == null) return;
   
    List<ReferenceType> refTypes = vm.classesByName(className);
    ExceptionRequest exReq = vm.eventRequestManager().createExceptionRequest(refTypes.get(0), true, true);
    exReq.setSuspendPolicy(ExceptionRequest.SUSPEND_EVENT_THREAD);
    exReq.setEnabled(true);
    requests.put(className, exReq);
   
  }
View Full Code Here

Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

 
  public void tryRemoveExceptionRequest(String className) {
    Debugger debugger = Debugger.getInstance();
    VirtualMachine vm = debugger.getVm();
    if (vm==null) return ;
    EventRequestManager erm = vm.eventRequestManager();
    if (erm == null) return;
   
    ExceptionRequest exReq = requests.get(className);
    vm.eventRequestManager().deleteEventRequest(exReq);
  }
View Full Code Here

Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

    if (vm==null) return ;
    EventRequestManager erm = vm.eventRequestManager();
    if (erm == null) return;
   
    ExceptionRequest exReq = requests.get(className);
    vm.eventRequestManager().deleteEventRequest(exReq);
  }
 
  public void tryCreateExceptionRequest() {
    for (String className : exceptions) {
      tryCreateExceptionRequest(className);
View Full Code Here

Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

  public void tryCreatePrepareRequest() {
   
    Debugger debugger = Debugger.getInstance();
    VirtualMachine vm = debugger.getVm();
    if (vm==null) return ;
    EventRequestManager erm = vm.eventRequestManager();
    if (erm == null) return;
   
    HashSet<String> names = new HashSet<String>();
   
    for (Breakpoint bp : allBreakpoints) {
View Full Code Here

Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

    List<BreakpointRequest> requests = breakpoint.getRequests();
    if (requests == null || requests.size() == 0)
      return;
    for (BreakpointRequest bp : requests) {
      try {
        vm.eventRequestManager().deleteEventRequest(bp);
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
View Full Code Here

Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

        lines = rt.locationsOfLine(lineNum);
        if (lines.size() == 0) {
          continue;
        }
        Location loc = lines.get(0);
        BreakpointRequest request = vm.eventRequestManager().createBreakpointRequest(loc);
        request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
        request.setEnabled(true);
        breakpoint.addRequest(request);
      } catch (AbsentInformationException e) {
        e.printStackTrace();
View Full Code Here

Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

    Debugger debugger = Debugger.getInstance();
    VirtualMachine vm = debugger.getVm();
    SuspendThreadStack threadStack = SuspendThreadStack.getInstance();
    ThreadReference threadRef = threadStack.getCurThreadRef();

    EventRequestManager mgr = vm.eventRequestManager();

    List<StepRequest> steps = mgr.stepRequests();
    for (int i = 0; i < steps.size(); i++) {
      StepRequest step = steps.get(i);
      if (step.thread().equals(threadRef)) {
View Full Code Here

Examples of com.sun.jdi.VirtualMachine.eventRequestManager()

    this.errorStream = errorStream;
    if (extraArg == null || !(extraArg instanceof ClassType))
      throw new IllegalArgumentException("No JDWP communication class found");
    communicationClass = (ClassType) extraArg;
    VirtualMachine vm = communicationClass.virtualMachine();
    if (vm.eventRequestManager().stepRequests().size() > 0) {
      throw new RuntimeException("Some threads are currently stepping");
    }
    if (vm.eventRequestManager().breakpointRequests().size() > 0) {
      throw new RuntimeException("There are some breakpoints set");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.