Search in sources :

Example 1 with FieldBreakpointEvent

use of com.oracle.truffle.espresso.jdwp.impl.FieldBreakpointEvent in project graal by oracle.

the class VMEventListenerImpl method onFieldModification.

@Override
@TruffleBoundary
public boolean onFieldModification(FieldRef field, Object receiver, Object value) {
    boolean active = false;
    for (FieldBreakpoint info : field.getFieldBreakpointInfos()) {
        if (info.isModificationBreakpoint()) {
            // OK, tell the Debug API to suspend the thread now
            debuggerController.prepareFieldBreakpoint(new FieldBreakpointEvent((FieldBreakpointInfo) info, receiver, value));
            debuggerController.suspend(context.asGuestThread(Thread.currentThread()));
            active = true;
        }
    }
    return active;
}
Also used : FieldBreakpointEvent(com.oracle.truffle.espresso.jdwp.impl.FieldBreakpointEvent) FieldBreakpointInfo(com.oracle.truffle.espresso.jdwp.impl.FieldBreakpointInfo) TruffleBoundary(com.oracle.truffle.api.CompilerDirectives.TruffleBoundary)

Example 2 with FieldBreakpointEvent

use of com.oracle.truffle.espresso.jdwp.impl.FieldBreakpointEvent in project graal by oracle.

the class VMEventListenerImpl method onFieldAccess.

@Override
@TruffleBoundary
public boolean onFieldAccess(FieldRef field, Object receiver) {
    boolean active = false;
    for (FieldBreakpoint info : field.getFieldBreakpointInfos()) {
        if (info.isAccessBreakpoint()) {
            // OK, tell the Debug API to suspend the thread now
            debuggerController.prepareFieldBreakpoint(new FieldBreakpointEvent((FieldBreakpointInfo) info, receiver));
            debuggerController.suspend(context.asGuestThread(Thread.currentThread()));
            active = true;
        }
    }
    return active;
}
Also used : FieldBreakpointEvent(com.oracle.truffle.espresso.jdwp.impl.FieldBreakpointEvent) FieldBreakpointInfo(com.oracle.truffle.espresso.jdwp.impl.FieldBreakpointInfo) TruffleBoundary(com.oracle.truffle.api.CompilerDirectives.TruffleBoundary)

Aggregations

TruffleBoundary (com.oracle.truffle.api.CompilerDirectives.TruffleBoundary)2 FieldBreakpointEvent (com.oracle.truffle.espresso.jdwp.impl.FieldBreakpointEvent)2 FieldBreakpointInfo (com.oracle.truffle.espresso.jdwp.impl.FieldBreakpointInfo)2