com.sun.jdi.event.Event Java Examples

The following examples show how to use com.sun.jdi.event.Event. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VMRemoteTarget.java    From gravel with Apache License 2.0 6 votes vote down vote up
private void eventLoop() throws InterruptedException {
	System.out.println("eventLoop started");
	EventQueue eventQueue = vm.eventQueue();
	boolean isRunning = true;
	while (isRunning) {
		EventSet eventSet = eventQueue.remove();
		boolean mayResume = true;
		for (Event event : eventSet) {
			System.out.println(event);
			if (event instanceof VMDeathEvent
					|| event instanceof VMDisconnectEvent) {
				isRunning = false;
			} else if (event instanceof ExceptionEvent) {
				mayResume = false;
			}
		}
		if (mayResume) eventSet.resume();
	}
}
 
Example #2
Source File: UsageDataSession.java    From java-debug with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Record JDI event.
 */
public static void recordEvent(Event event) {
    try {
        UsageDataSession currentSession = threadLocal.get();
        if (currentSession != null) {
            Map<String, String> eventEntry = new HashMap<>();
            eventEntry.put("timestamp", String.valueOf(System.currentTimeMillis()));
            eventEntry.put("event", event.toString());
            synchronized (currentSession.eventList) {
                currentSession.eventList.add(JsonUtils.toJson(eventEntry));
            }
        }
    } catch (Exception e) {
        logger.log(Level.SEVERE, String.format("Exception on recording event: %s.", e.toString()), e);
    }
}
 
Example #3
Source File: StartActionProvider.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private Operator createOperator (
    VirtualMachine virtualMachine,
    final boolean [] startLock
) {
    return new Operator (
        virtualMachine,
        debuggerImpl,
        new Executor () {
            @Override
            public boolean exec(Event event) {
                synchronized(startLock) {
                    startLock[0] = true;
                    startLock.notify();
                }
                return false;
            }

            @Override
            public void removed(EventRequest eventRequest) {}
            
        },
        new Runnable () {
            @Override
            public void run () {
                debuggerImpl.finish();
            }
        },
        debuggerImpl.accessLock
    );
}
 
Example #4
Source File: DynamothCollector.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
private void processVMEvents() {
	try {
		// process events
		final EventQueue eventQueue = vm.eventQueue();
		while (true) {
			EventSet eventSet = eventQueue.remove(TimeUnit.SECONDS.toMillis(this.dataCollectionTimeoutInSeconds));
			if (eventSet == null)
				return; // timeout
			for (Event event : eventSet) {
				if (event instanceof VMDeathEvent || event instanceof VMDisconnectEvent) {
					// exit
					DebugJUnitRunner.process.destroy();
					// logger.debug("Exit");
					// System.out.println("VM Event: Exit");
					return;
				} else if (event instanceof ClassPrepareEvent) {
					// logger.debug("ClassPrepareEvent");
					// System.out.println("VM event: ClassPrepareEvent");
					processClassPrepareEvent();
				} else if (event instanceof BreakpointEvent) {
					// logger.debug("VM Event: BreakpointEvent");
					// System.out.println("VM BreakpointEvent");
					processBreakPointEvents((BreakpointEvent) event);
				}
			}
			eventSet.resume();
		} // end while true
	} catch (Exception e) {
		System.err.println("Error processing VMEvents");
		e.printStackTrace();
	} finally {
		DebugJUnitRunner.process.destroy();
	}
}
 
Example #5
Source File: BreakpointImpl.java    From netbeans with Apache License 2.0 5 votes vote down vote up
boolean processCondition(
        Event event,
        String condition,
        ThreadReference threadReference,
        Value returnValue) {
    
    return processCondition(event, condition, threadReference, returnValue, null);
}
 
Example #6
Source File: FieldMonitor.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args)
    throws IOException, InterruptedException {

  //VirtualMachine vm = launchTarget(sb.toString());
  VirtualMachine vm = launchTarget(CLASS_NAME);

  System.out.println("Vm launched");

  // process events
  EventQueue eventQueue = vm.eventQueue();
  // resume the vm

  Process process = vm.process();


  // Copy target's output and error to our output and error.
  Thread outThread = new StreamRedirectThread("out reader", process.getInputStream());
  Thread errThread = new StreamRedirectThread("error reader", process.getErrorStream());

  errThread.start();
  outThread.start();

  boolean connected = true;
  int watched = 0;
  while (connected) {
    EventSet eventSet = eventQueue.remove();
    for (Event event : eventSet) {
      System.out.println("FieldMonitor-main receives: "+event);
      if (event instanceof VMStartEvent) {
        addClassWatch(vm);
      } else if (event instanceof VMDeathEvent
          || event instanceof VMDisconnectEvent) {
        // exit
        connected = false;
      } else if (event instanceof ClassPrepareEvent) {
        // watch field on loaded class
        System.out.println("ClassPrepareEvent");
        ClassPrepareEvent classPrepEvent = (ClassPrepareEvent) event;
        ReferenceType refType = classPrepEvent
            .referenceType();
        addFieldWatch(vm, refType);
      } else if (event instanceof ModificationWatchpointEvent) {
        watched++;
        System.out.println("sleep for 500 ms");
        Thread.sleep(500);

        ModificationWatchpointEvent modEvent = (ModificationWatchpointEvent) event;
        System.out.println("old="
            + modEvent.valueCurrent());
        System.out.println("new=" + modEvent.valueToBe());
      }
    }
    System.out.println("resume...");
    eventSet.resume();
  }
  // Shutdown begins when event thread terminates
  try {
      errThread.join(); // Make sure output is forwarded
      outThread.join();
  } catch (InterruptedException exc) {
      // we don't interrupt
  }

  if (watched != 11) { // init + 10 modifications in TestPostFieldModification class
      throw new Error("Expected to receive 11 times ModificationWatchpointEvent, but got "+watched);
  }
}
 
Example #7
Source File: VMTargetStarter.java    From gravel with Apache License 2.0 4 votes vote down vote up
public VMRemoteTarget createJVM() throws IOException, InterruptedException,
		IncompatibleThreadStateException {
	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();

	List<ThreadReference> allThreads = vm.allThreads();
	for (ThreadReference threadReference : allThreads) {
		System.out.println(threadReference+" isSuspended: "+threadReference.isSuspended()+" suspendCount: "+threadReference.suspendCount());
	}

	// process events
	EventQueue eventQueue = vm.eventQueue();
	while (true) {
		EventSet eventSet = eventQueue.remove();
		for (Event event : eventSet) {
			if (event instanceof ClassPrepareEvent) {
				event.request().disable();
				installHaltPoint(vm);
			}
			if (event instanceof VMDeathEvent
					|| event instanceof VMDisconnectEvent) {
				return null;
			}
			if (event instanceof BreakpointEvent) {
				event.request().disable();
				ThreadReference thread = ((BreakpointEvent) event).thread();
				return new VMRemoteTarget(process, vm, thread, debugPort);
			}
		}
		eventSet.resume();
	}
}
 
Example #8
Source File: DecisionProcedureGuidanceJDI.java    From jbse with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Does a single execution step of the concrete state.
 * 
 * @param doStepInto if {@code true} and the current bytecode is an INVOKEX bytecode,
 *        steps into the invoked method; if {@code false} and the current bytecode is 
 *        an INVOKEX bytecode, steps over.
 * @throws GuidanceException 
 */
private void doStep(boolean doStepInto) throws GuidanceException {
    final int stepDepth = doStepInto ? StepRequest.STEP_INTO : StepRequest.STEP_OVER;

    final ThreadReference thread = this.methodEntryEvent.thread();
    final EventRequestManager mgr = this.vm.eventRequestManager();
    final StepRequest sr = mgr.createStepRequest(thread, StepRequest.STEP_MIN, stepDepth);
    sr.enable();

    //if we are at an ILOAD bytecode followed by an XALOAD, 
    //we store the value from the variable because it is used
    //as XALOAD index
    final int currentCodeIndex = getCurrentCodeIndex();
    final byte[] bc = getCurrentBytecode();
    final byte currentOpcode = bc[currentCodeIndex];
    if (currentOpcode == OP_ILOAD || 
        (OP_ILOAD_0 <= currentOpcode && currentOpcode <= OP_ILOAD_3)) {
        final boolean wide = (this.previousCodeIndex >= 0 && bc[this.previousCodeIndex] == OP_WIDE);
        final int nextCodeIndex; 
        if (currentOpcode == OP_ILOAD) {
            nextCodeIndex = currentCodeIndex + (wide ? XLOADSTORE_IMMEDIATE_WIDE_OFFSET : XLOADSTORE_IMMEDIATE_OFFSET);
        } else {
            nextCodeIndex = currentCodeIndex + XLOADSTORE_IMPLICIT_OFFSET;
        }
        final byte opcodeNext = bc[nextCodeIndex];
        if (OP_IALOAD <= opcodeNext && opcodeNext <= OP_SALOAD) {
            //determines the index of the local variable
            final int localVariableIndex;
            if (currentOpcode == OP_ILOAD_0) {
                localVariableIndex = 0;
            } else if (currentOpcode == OP_ILOAD_1) {
                localVariableIndex = 1;
            } else if (currentOpcode == OP_ILOAD_2) {
                localVariableIndex = 2;
            } else if (currentOpcode == OP_ILOAD_3) {
                localVariableIndex = 3;
            } else {
                localVariableIndex = (wide ? byteCat(bc[currentCodeIndex + 1], bc[currentCodeIndex + 2]) : asUnsignedByte(bc[currentCodeIndex + 1]));
            }
            this.xaloadIndex = readLocalVariable(localVariableIndex);
        } else {
            this.xaloadIndex = null;
        }
    } else if (OP_IALOAD <= currentOpcode && currentOpcode <= OP_SALOAD) {
        //does nothing
    } else {
        this.xaloadIndex = null;
    }
    if (isInvoke(currentOpcode) || isReturn(currentOpcode)) {
        //no valid previous code index
        this.previousCodeIndex = -1;
    } else {
        this.previousCodeIndex = currentCodeIndex;
    }
    this.vm.resume();
    final EventQueue queue = this.vm.eventQueue();

    boolean stepFound = false;
    while (!stepFound) {
        try {
            final EventSet eventSet = queue.remove();
            final EventIterator it = eventSet.eventIterator();
            while (!stepFound && it.hasNext()) {
                final Event event = it.nextEvent();

                if (event instanceof StepEvent) {
                    this.currentStepEvent = (StepEvent) event;
                    stepFound = true;
                }
            }
            if (!stepFound) {
                eventSet.resume();
            }
        } catch (InterruptedException | VMDisconnectedException e) {
            throw new GuidanceException(e);
        }
    }

    sr.disable();
}
 
Example #9
Source File: FieldMonitor.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args)
    throws IOException, InterruptedException {

  //VirtualMachine vm = launchTarget(sb.toString());
  VirtualMachine vm = launchTarget(CLASS_NAME);

  System.out.println("Vm launched");

  // process events
  EventQueue eventQueue = vm.eventQueue();
  // resume the vm

  Process process = vm.process();


  // Copy target's output and error to our output and error.
  Thread outThread = new StreamRedirectThread("out reader", process.getInputStream());
  Thread errThread = new StreamRedirectThread("error reader", process.getErrorStream());

  errThread.start();
  outThread.start();

  boolean connected = true;
  int watched = 0;
  while (connected) {
    EventSet eventSet = eventQueue.remove();
    for (Event event : eventSet) {
      System.out.println("FieldMonitor-main receives: "+event);
      if (event instanceof VMStartEvent) {
        addClassWatch(vm);
      } else if (event instanceof VMDeathEvent
          || event instanceof VMDisconnectEvent) {
        // exit
        connected = false;
      } else if (event instanceof ClassPrepareEvent) {
        // watch field on loaded class
        System.out.println("ClassPrepareEvent");
        ClassPrepareEvent classPrepEvent = (ClassPrepareEvent) event;
        ReferenceType refType = classPrepEvent
            .referenceType();
        addFieldWatch(vm, refType);
      } else if (event instanceof ModificationWatchpointEvent) {
        watched++;
        System.out.println("sleep for 500 ms");
        Thread.sleep(500);

        ModificationWatchpointEvent modEvent = (ModificationWatchpointEvent) event;
        System.out.println("old="
            + modEvent.valueCurrent());
        System.out.println("new=" + modEvent.valueToBe());
      }
    }
    System.out.println("resume...");
    eventSet.resume();
  }
  // Shutdown begins when event thread terminates
  try {
      errThread.join(); // Make sure output is forwarded
      outThread.join();
  } catch (InterruptedException exc) {
      // we don't interrupt
  }

  if (watched != 11) { // init + 10 modifications in TestPostFieldModification class
      throw new Error("Expected to receive 11 times ModificationWatchpointEvent, but got "+watched);
  }
}
 
Example #10
Source File: EventHub.java    From java-debug with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Starts retrieving events from the event queue of the specified virtual machine.
 *
 * @param vm
 *            the target virtual machine.
 */
@Override
public void start(VirtualMachine vm) {
    if (isClosed) {
        throw new IllegalStateException("This event hub is already closed.");
    }

    workingThread = new Thread(() -> {
        EventQueue queue = vm.eventQueue();
        while (true) {
            try {
                if (Thread.interrupted()) {
                    subject.onComplete();
                    return;
                }

                EventSet set = queue.remove();

                boolean shouldResume = true;
                for (Event event : set) {
                    try {
                        logger.fine("\nJDI Event: " + event + "\n");
                    } catch (VMDisconnectedException e) {
                        // do nothing
                    }
                    DebugEvent dbgEvent = new DebugEvent();
                    dbgEvent.event = event;
                    dbgEvent.eventSet = set;
                    subject.onNext(dbgEvent);
                    shouldResume &= dbgEvent.shouldResume;
                }

                if (shouldResume) {
                    set.resume();
                }
            } catch (InterruptedException e) {
                isClosed = true;
                subject.onComplete();
                return;
            } catch (VMDisconnectedException e) {
                isClosed = true;
                subject.onError(e);
                return;
            }
        }
    }, "Event Hub");

    workingThread.start();
}
 
Example #11
Source File: FieldMonitor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args)
    throws IOException, InterruptedException {

  //VirtualMachine vm = launchTarget(sb.toString());
  VirtualMachine vm = launchTarget(CLASS_NAME);

  System.out.println("Vm launched");

  // process events
  EventQueue eventQueue = vm.eventQueue();
  // resume the vm

  Process process = vm.process();


  // Copy target's output and error to our output and error.
  Thread outThread = new StreamRedirectThread("out reader", process.getInputStream());
  Thread errThread = new StreamRedirectThread("error reader", process.getErrorStream());

  errThread.start();
  outThread.start();

  boolean connected = true;
  int watched = 0;
  while (connected) {
    EventSet eventSet = eventQueue.remove();
    for (Event event : eventSet) {
      System.out.println("FieldMonitor-main receives: "+event);
      if (event instanceof VMStartEvent) {
        addClassWatch(vm);
      } else if (event instanceof VMDeathEvent
          || event instanceof VMDisconnectEvent) {
        // exit
        connected = false;
      } else if (event instanceof ClassPrepareEvent) {
        // watch field on loaded class
        System.out.println("ClassPrepareEvent");
        ClassPrepareEvent classPrepEvent = (ClassPrepareEvent) event;
        ReferenceType refType = classPrepEvent
            .referenceType();
        addFieldWatch(vm, refType);
      } else if (event instanceof ModificationWatchpointEvent) {
        watched++;
        System.out.println("sleep for 500 ms");
        Thread.sleep(500);

        ModificationWatchpointEvent modEvent = (ModificationWatchpointEvent) event;
        System.out.println("old="
            + modEvent.valueCurrent());
        System.out.println("new=" + modEvent.valueToBe());
      }
    }
    System.out.println("resume...");
    eventSet.resume();
  }
  // Shutdown begins when event thread terminates
  try {
      errThread.join(); // Make sure output is forwarded
      outThread.join();
  } catch (InterruptedException exc) {
      // we don't interrupt
  }

  if (watched != 11) { // init + 10 modifications in TestPostFieldModification class
      throw new Error("Expected to receive 11 times ModificationWatchpointEvent, but got "+watched);
  }
}
 
Example #12
Source File: BreakpointImpl.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private boolean evaluateCondition (
    Event event,
    String condition,
    ThreadReference thread,
    ObjectVariable contextVar
) {
    try {
        try {
            boolean success;
            JPDAThreadImpl jtr = debugger.getThread(thread);
            jtr.accessLock.writeLock().lock();
            try {
                CallStackFrame[] csfs = jtr.getCallStack(0, 1);
                if (csfs.length > 0) {
                    success = evaluateConditionIn (condition, csfs[0], contextVar);
                } else {
                    // Can not evaluate any condition without the top stack frame.
                    success = true;
                }
            } finally {
                jtr.accessLock.writeLock().unlock();
            }
            // condition true => stop here (do not resume)
            // condition false => resume
            logger.log(Level.FINE,
                       "BreakpointImpl: perform breakpoint (condition = {0}): {1} resume: {2}",
                       new Object[]{success, this, !success});
            return success;
        } catch (InvalidExpressionException ex) {
            conditionException.put(event, ex);
            logger.log(Level.FINE,
                       "BreakpointImpl: perform breakpoint (bad condition): ''{0}'', got {1}",
                       new Object[]{condition, ex.getMessage()});
            return true; // Act as if the condition was satisfied when it's invalid
        }
    /*} catch (IncompatibleThreadStateException ex) {
        // should not occurre
        Exceptions.printStackTrace(ex);
        return true; // Act as if the condition was satisfied when an error occurs
    } catch (IllegalThreadStateExceptionWrapper ex) {
        return true;
    } catch (ObjectCollectedExceptionWrapper ex) {
        return true;
    } catch (InternalExceptionWrapper ex) {
        return true;
    } catch (VMDisconnectedExceptionWrapper ex) {
        return true;*/
    } catch (AbsentInformationException abex) {
        logger.log(Level.INFO, condition, abex);
        return true;
    }
}
 
Example #13
Source File: ClassBreakpointImpl.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public boolean processCondition(Event event) {
    return true; // Empty condition, always satisfied.
}
 
Example #14
Source File: ThreadBreakpointImpl.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public boolean processCondition(Event event) {
    return processCondition(event, null, null, null);
}
 
Example #15
Source File: BreakpointsEngineListener.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public boolean exec(Event event) {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #16
Source File: BreakpointsEngineListener.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public boolean processCondition(Event event) {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #17
Source File: FieldMonitor.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args)
    throws IOException, InterruptedException {

  //VirtualMachine vm = launchTarget(sb.toString());
  VirtualMachine vm = launchTarget(CLASS_NAME);

  System.out.println("Vm launched");

  // process events
  EventQueue eventQueue = vm.eventQueue();
  // resume the vm

  Process process = vm.process();


  // Copy target's output and error to our output and error.
  Thread outThread = new StreamRedirectThread("out reader", process.getInputStream());
  Thread errThread = new StreamRedirectThread("error reader", process.getErrorStream());

  errThread.start();
  outThread.start();

  boolean connected = true;
  int watched = 0;
  while (connected) {
    EventSet eventSet = eventQueue.remove();
    for (Event event : eventSet) {
      System.out.println("FieldMonitor-main receives: "+event);
      if (event instanceof VMStartEvent) {
        addClassWatch(vm);
      } else if (event instanceof VMDeathEvent
          || event instanceof VMDisconnectEvent) {
        // exit
        connected = false;
      } else if (event instanceof ClassPrepareEvent) {
        // watch field on loaded class
        System.out.println("ClassPrepareEvent");
        ClassPrepareEvent classPrepEvent = (ClassPrepareEvent) event;
        ReferenceType refType = classPrepEvent
            .referenceType();
        addFieldWatch(vm, refType);
      } else if (event instanceof ModificationWatchpointEvent) {
        watched++;
        System.out.println("sleep for 500 ms");
        Thread.sleep(500);

        ModificationWatchpointEvent modEvent = (ModificationWatchpointEvent) event;
        System.out.println("old="
            + modEvent.valueCurrent());
        System.out.println("new=" + modEvent.valueToBe());
      }
    }
    System.out.println("resume...");
    eventSet.resume();
  }
  // Shutdown begins when event thread terminates
  try {
      errThread.join(); // Make sure output is forwarded
      outThread.join();
  } catch (InterruptedException exc) {
      // we don't interrupt
  }

  if (watched != 11) { // init + 10 modifications in TestPostFieldModification class
      throw new Error("Expected to receive 11 times ModificationWatchpointEvent, but got "+watched);
  }
}
 
Example #18
Source File: FieldMonitor.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args)
    throws IOException, InterruptedException {

  //VirtualMachine vm = launchTarget(sb.toString());
  VirtualMachine vm = launchTarget(CLASS_NAME);

  System.out.println("Vm launched");

  // process events
  EventQueue eventQueue = vm.eventQueue();
  // resume the vm

  Process process = vm.process();


  // Copy target's output and error to our output and error.
  Thread outThread = new StreamRedirectThread("out reader", process.getInputStream());
  Thread errThread = new StreamRedirectThread("error reader", process.getErrorStream());

  errThread.start();
  outThread.start();

  boolean connected = true;
  int watched = 0;
  while (connected) {
    EventSet eventSet = eventQueue.remove();
    for (Event event : eventSet) {
      System.out.println("FieldMonitor-main receives: "+event);
      if (event instanceof VMStartEvent) {
        addClassWatch(vm);
      } else if (event instanceof VMDeathEvent
          || event instanceof VMDisconnectEvent) {
        // exit
        connected = false;
      } else if (event instanceof ClassPrepareEvent) {
        // watch field on loaded class
        System.out.println("ClassPrepareEvent");
        ClassPrepareEvent classPrepEvent = (ClassPrepareEvent) event;
        ReferenceType refType = classPrepEvent
            .referenceType();
        addFieldWatch(vm, refType);
      } else if (event instanceof ModificationWatchpointEvent) {
        watched++;
        System.out.println("sleep for 500 ms");
        Thread.sleep(500);

        ModificationWatchpointEvent modEvent = (ModificationWatchpointEvent) event;
        System.out.println("old="
            + modEvent.valueCurrent());
        System.out.println("new=" + modEvent.valueToBe());
      }
    }
    System.out.println("resume...");
    eventSet.resume();
  }
  // Shutdown begins when event thread terminates
  try {
      errThread.join(); // Make sure output is forwarded
      outThread.join();
  } catch (InterruptedException exc) {
      // we don't interrupt
  }

  if (watched != 11) { // init + 10 modifications in TestPostFieldModification class
      throw new Error("Expected to receive 11 times ModificationWatchpointEvent, but got "+watched);
  }
}
 
Example #19
Source File: Executor.java    From netbeans with Apache License 2.0 2 votes vote down vote up
/**
 * Callback method from Operator.
 *
 * @return true if execution should be resumed after action.
 */
public boolean exec (Event event);
 
Example #20
Source File: ConditionedExecutor.java    From netbeans with Apache License 2.0 2 votes vote down vote up
/**
 * Process the condition associated with this event.
 * The method is called before {@link Executor#exec(com.sun.jdi.event.Event)}.
 * Depending on the returned value, the {@link Executor#exec(com.sun.jdi.event.Event)}
 * method will be called as normally, or this event will be ignored and suspended threads resumed.
 *
 * @param event The event to process.
 * @return <code>true</code> if the condition was evaluated successfully and
 * the event will be furter processed, <code>false</code> if the event should
 * not be considered for furter processing.
 */
boolean processCondition(Event event);