1665 if ((error == JVMTI_ERROR_NONE) && (clazz != NULL)) {
1666 error = eventFilter_setLocationOnlyFilter(node, index++, clazz,
1667 method, location);
1668 }
1669 /*
1670 * Create the new handler node
1671 */
1672 error = installHandler(node, func, JNI_FALSE);
1673
1674 if (error != JVMTI_ERROR_NONE) {
1675 (void)eventHandler_free(node);
1676 node = NULL;
1677 }
1678 return node;
1679 }
1680
1681 HandlerNode *
1682 eventHandler_createPermanentInternal(EventIndex ei, HandlerFunction func)
1683 {
1684 return createInternal(ei, func, NULL,
1685 NULL, NULL, (jlocation)NULL, JNI_TRUE);
1686 }
1687
1688 HandlerNode *
1689 eventHandler_createInternalThreadOnly(EventIndex ei,
1690 HandlerFunction func,
1691 jthread thread)
1692 {
1693 return createInternal(ei, func, thread,
1694 NULL, NULL, (jlocation)NULL, JNI_FALSE);
1695 }
1696
1697 HandlerNode *
1698 eventHandler_createInternalBreakpoint(HandlerFunction func,
1699 jthread thread,
1700 jclass clazz,
1701 jmethodID method,
1702 jlocation location)
1703 {
1704 return createInternal(EI_BREAKPOINT, func, thread,
1705 clazz, method, location, JNI_FALSE);
1706 }
1707
1708 jvmtiError
1709 eventHandler_installExternal(HandlerNode *node)
1710 {
1711 return installHandler(node,
1712 standardHandlers_defaultHandler(node->ei),
1713 JNI_TRUE);
1714 }
|
1665 if ((error == JVMTI_ERROR_NONE) && (clazz != NULL)) {
1666 error = eventFilter_setLocationOnlyFilter(node, index++, clazz,
1667 method, location);
1668 }
1669 /*
1670 * Create the new handler node
1671 */
1672 error = installHandler(node, func, JNI_FALSE);
1673
1674 if (error != JVMTI_ERROR_NONE) {
1675 (void)eventHandler_free(node);
1676 node = NULL;
1677 }
1678 return node;
1679 }
1680
1681 HandlerNode *
1682 eventHandler_createPermanentInternal(EventIndex ei, HandlerFunction func)
1683 {
1684 return createInternal(ei, func, NULL,
1685 NULL, NULL, 0, JNI_TRUE);
1686 }
1687
1688 HandlerNode *
1689 eventHandler_createInternalThreadOnly(EventIndex ei,
1690 HandlerFunction func,
1691 jthread thread)
1692 {
1693 return createInternal(ei, func, thread,
1694 NULL, NULL, 0, JNI_FALSE);
1695 }
1696
1697 HandlerNode *
1698 eventHandler_createInternalBreakpoint(HandlerFunction func,
1699 jthread thread,
1700 jclass clazz,
1701 jmethodID method,
1702 jlocation location)
1703 {
1704 return createInternal(EI_BREAKPOINT, func, thread,
1705 clazz, method, location, JNI_FALSE);
1706 }
1707
1708 jvmtiError
1709 eventHandler_installExternal(HandlerNode *node)
1710 {
1711 return installHandler(node,
1712 standardHandlers_defaultHandler(node->ei),
1713 JNI_TRUE);
1714 }
|