public static F3Event wrap(F3VirtualMachine f3vm, Event evt) { if (evt == null) { return null; } if (evt instanceof AccessWatchpointEvent) { return new F3AccessWatchpointEvent(f3vm, (AccessWatchpointEvent)evt); } else if (evt instanceof BreakpointEvent) { return new F3BreakpointEvent(f3vm, (BreakpointEvent)evt); } else if (evt instanceof ClassPrepareEvent) { return new F3ClassPrepareEvent(f3vm, (ClassPrepareEvent)evt); } else if (evt instanceof ClassUnloadEvent) { return new F3ClassUnloadEvent(f3vm, (ClassUnloadEvent)evt); } else if (evt instanceof ExceptionEvent) { return new F3ExceptionEvent(f3vm, (ExceptionEvent)evt); } else if (evt instanceof MethodEntryEvent) { return new F3MethodEntryEvent(f3vm, (MethodEntryEvent)evt); } else if (evt instanceof MethodExitEvent) { return new F3MethodExitEvent(f3vm, (MethodExitEvent)evt); } else if (evt instanceof ModificationWatchpointEvent) { return new F3ModificationWatchpointEvent(f3vm, (ModificationWatchpointEvent)evt); } else if (evt instanceof MonitorContendedEnterEvent) { return new F3MonitorContendedEnterEvent(f3vm, (MonitorContendedEnterEvent)evt); } else if (evt instanceof MonitorContendedEnteredEvent) { return new F3MonitorContendedEnteredEvent(f3vm, (MonitorContendedEnteredEvent)evt); } else if (evt instanceof MonitorWaitEvent) { return new F3MonitorWaitEvent(f3vm, (MonitorWaitEvent)evt); } else if (evt instanceof MonitorWaitedEvent) { return new F3MonitorWaitedEvent(f3vm, (MonitorWaitedEvent)evt); } else if (evt instanceof StepEvent) { return new F3StepEvent(f3vm, (StepEvent)evt); } else if (evt instanceof ThreadDeathEvent) { return new F3ThreadDeathEvent(f3vm, (ThreadDeathEvent)evt); } else if (evt instanceof ThreadStartEvent) { return new F3ThreadStartEvent(f3vm, (ThreadStartEvent)evt); } else if (evt instanceof VMDeathEvent) { return new F3VMDeathEvent(f3vm, (VMDeathEvent)evt); } else if (evt instanceof VMDisconnectEvent) { return new F3VMDisconnectEvent(f3vm, (VMDisconnectEvent)evt); } else if (evt instanceof VMStartEvent) { return new F3VMStartEvent(f3vm, (VMStartEvent)evt); } else if (evt instanceof WatchpointEvent) { return new F3WatchpointEvent(f3vm, (WatchpointEvent)evt); } else if (evt instanceof LocatableEvent) { return new F3LocatableEvent(f3vm, (LocatableEvent)evt); } else { return new F3Event(f3vm, evt); } }
@Override public synchronized void jdiThreadDeath(final ThreadDeathEvent event) { if (!override && !owner.isStarted()) { return; } try { if (vmThreadId != null) { delegate.handleThreadDeath(event); } } catch (final Throwable e) { JiveDebugPlugin.log(e); } }
/** * Dispatch incoming events */ private void handleEvent(Event event) { if (event instanceof ExceptionEvent) { if (!enableProfiling) exceptionManager.exceptionEvent((ExceptionEvent)event); } else if (event instanceof MethodEntryEvent) { methodEntryEvent((MethodEntryEvent)event); } else if (event instanceof MethodExitEvent) { methodExitEvent((MethodExitEvent)event); } else if (event instanceof ThreadDeathEvent) { threadeath.threadDeathEvent((ThreadDeathEvent)event); } else if (event instanceof VMDeathEvent) { vmDeathEvent((VMDeathEvent)event); } else if (event instanceof VMDisconnectEvent) { connected = disconnect.vmDisconnectEvent((VMDisconnectEvent)event); } }
public void threadDeathEvent(ThreadDeathEvent evt) { synchronized (listeners) { for (EventNotifier en : listeners) { en.threadDeathEvent(evt); } } }
void handleThreadDeath(final ThreadDeathEvent event) { final ThreadReference thread = event.thread(); /** * If a thread dies with outstanding frames, then all frames are popped with an exception. An * unexpected termination is gracefully handled by the execution model. */ while (executionState().frameCount(thread.uniqueID()) != 0) { // if by any chance the VM generated a throw event if (executionState().containsException(thread.uniqueID())) { final ExceptionEvent exception = outstandingException(thread); dispatcher().dispatchThrowEvent(exception, true); } else { dispatcher().dispatchThrowEvent(thread, true); } } if (executionState().containsException(thread.uniqueID())) { removeException(thread); } handlePendingReturned(null, null, event.thread()); final IThreadValue threadValue = owner.model().valueFactory() .createThread(thread.uniqueID(), thread.name()); // avoid duplicate thread termination final IThreadStartEvent threadStart = owner.model().lookupThread(threadValue); if (threadStart != null && threadStart.terminator() == null) { dispatcher().dispatchThreadDeath(event.thread()); } }
@Override public void jdiThreadDeath(final ThreadDeathEvent event) { // this.currentEvent = null; this.currentThread = event.thread(); // this.currentEvent = null; this.currentThread = null; }
@Override public boolean handleEvent(final Event event, final JDIDebugTarget target, final boolean suspendVote, final EventSet eventSet) { if (isActive() && jdiManager().modelFilter().acceptsThread(((ThreadDeathEvent) event).thread())) { jdiHandler().jdiThreadDeath((ThreadDeathEvent) event); } return super.handleEvent(event, target, suspendVote, eventSet); }
/** * Gets the observable object for thread events. * @return the observable object for thread events */ @Override public Observable<DebugEvent> threadEvents() { return this.events().filter(debugEvent -> debugEvent.event instanceof ThreadStartEvent || debugEvent.event instanceof ThreadDeathEvent); }
public F3ThreadDeathEvent(F3VirtualMachine f3vm, ThreadDeathEvent underlying) { super(f3vm, underlying); }
@Override protected ThreadDeathEvent underlying() { return (ThreadDeathEvent) super.underlying(); }
public void threadDeathEvent(ThreadDeathEvent e) { }
public VisitableThreadDeathEvent(ThreadDeathEvent event) { this.event = event; }
@Override public void visit(ThreadDeathEvent event) { }
/** * Visit a {@code ThreadDeathEvent}. * * @param event Event to visit */ void visit(ThreadDeathEvent event);
/** * Notification of a completed thread in the target VM. */ void jdiThreadDeath(ThreadDeathEvent event);
public void threadDeathEvent(ThreadDeathEvent event) { }