当前位置: 首页>>代码示例>>C++>>正文


C++ check_phase_and_method_debug函数代码示例

本文整理汇总了C++中check_phase_and_method_debug函数的典型用法代码示例。如果您正苦于以下问题:C++ check_phase_and_method_debug函数的具体用法?C++ check_phase_and_method_debug怎么用?C++ check_phase_and_method_debug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了check_phase_and_method_debug函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;

    if (flag) return;

    char* name;
    char* signature;
    char* generic;
    jint tcount;
    jthread* threads;
    jthread my_thread;
    jvmtiError result;
    jvmtiThreadInfo tinfo;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT))
    {
        if (check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                    "sub_special", DEBUG_OUT)) test = false;
        return;
    }

    flag = true;
    util = true;

    result = jvmti_env->GetAllThreads(&tcount, &threads);
    fprintf(stderr, "\tnative: GetAllThreads result = %d (must be zero) \n", result);
    if (result != JVMTI_ERROR_NONE) return;

    for ( int i = 0; i < tcount; i++ )
        if (jvmti_env->GetThreadInfo(threads[i], &tinfo) == JVMTI_ERROR_NONE)
            if (!strcmp(tinfo.name, "agent"))
            {
                fprintf(stderr, "\tnative: tested thread was found\n");
                my_thread = threads[i];
                break;
            }

    result = jvmti_env->SuspendThread(my_thread);
    fprintf(stderr, "\tnative: SuspendThread result = %d (must be zero) \n", result);
    if (result != JVMTI_ERROR_NONE) return;

    result = jvmti_env->PopFrame(create_not_alive_thread(jni_env, jvmti_env));
    fprintf(stderr, "\tnative: PopFrame result = %d (must be JVMTI_ERROR_THREAD_NOT_ALIVE (15)) \n", result);
    fprintf(stderr, "\tnative: thread is %p (must be NON-zero) \n", thread);
    fflush(stderr);
    if (result == JVMTI_ERROR_THREAD_NOT_ALIVE) test = true;

    result = jvmti_env->ResumeThread(my_thread);
    fprintf(stderr, "\tnative: ResumeThread result = %d (must be zero) \n", result);
    if (result != JVMTI_ERROR_NONE) return;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:56,代码来源:PopFrame0107.cpp

示例2: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;

    if (flag) return;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                                      "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    jlocation loc = 14;      /* Value was got as a result of experiment with
                              decoding ta_SetBreakpoint.class by jcf-dump */

    jvmtiError result = jvmti_env->SetBreakpoint(method, loc);
    fprintf(stderr, "\tnative: SetBreakpoint result = %d (must be zero) \n", result);
    fprintf(stderr, "\tnative: methodID is %p \n", method);
    fprintf(stderr, "\tnative: breakpoint location is %lld \n", (long long)loc);

    CAPABILITY_TURN_OFF_VOID(can_generate_breakpoint_events);

    result = jvmti_env->ClearBreakpoint(method, loc);
    fprintf(stderr, "\tnative: ClearBreakpoint result = %d (must be JVMTI_ERROR_MUST_POSSESS_CAPABILITY (99)) \n", result);
    if (result != JVMTI_ERROR_MUST_POSSESS_CAPABILITY) return;
    test = true;
}
开发者ID:mkloeppner,项目名称:drlvm-vts-bundle,代码行数:30,代码来源:ClearBreakpoint0102.cpp

示例3: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;

    if (flag) return;

    char* name;
    char* signature;
    char* generic;
    jvmtiError result;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    result = jvmti_env->GenerateEvents(jvmtiEvent(-100));
    fprintf(stderr, "\tnative: GenerateEvents result = %d (must be JVMTI_ERROR_INVALID_EVENT_TYPE (102)) \n", result);

    if (result == JVMTI_ERROR_INVALID_EVENT_TYPE) test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:25,代码来源:GenerateEvents0104.cpp

示例4: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    if (flag) return;

    check_EXCPT;

    jint depth = 0; /* I need current function only */
    jint varnum;
    jint slot = 0;
    jint value;
    jint modifiers = 0;
    jvmtiError result;
    jvmtiLocalVariableEntry* table;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    result = jvmti_env->GetMethodModifiers(method, NULL);
    fprintf(stderr, "\tnative: GetMethodModifiers result = %d (must be JVMTI_ERROR_NULL_POINTER (100)) \n", result);
    fprintf(stderr, "\tnative: method ID is %p \n", method);
    fflush(stderr);
    if (result != JVMTI_ERROR_NULL_POINTER) return;
    test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:30,代码来源:GetMethodModifiers0103.cpp

示例5: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;
    if (flag) return;
    char* signature;
    char* generic;
    jvmtiError result;
    jvmtiLineNumberEntry* table;
    jint count = 0;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    result = jvmti_env->GetLineNumberTable(method, NULL, &table);
    fprintf(stderr, "\tnative: GetLineNumberTable result = %d (must be JVMTI_ERROR_NULL_POINTER (100)) \n", result);
    fprintf(stderr, "\tnative: method ID is %p \n", method);
    fprintf(stderr, "\tnative: table is %p \n", table);
    fflush(stderr);

    if (result == JVMTI_ERROR_NULL_POINTER) test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:27,代码来源:GetLineNumberTable0106.cpp

示例6: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    if (flag) return;

    check_EXCPT;
    jvmtiError result;
    jobject fobject1 = NULL;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    fobject1 = (jobject)exception;

    result = jvmti_env->GetObjectSize(fobject1, NULL);
    fprintf(stderr, "\tnative: GetObjectSize #1 result = %d (must be JVMTI_ERROR_NULL_POINTER (100)) \n", result);
    fprintf(stderr, "\tnative: fobject1 is %p \n", fobject1);

    if (result == JVMTI_ERROR_NULL_POINTER ) test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:25,代码来源:GetObjectSize0103.cpp

示例7: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;

    if (flag) return;

    char* signature;
    char* generic;
    jint size;
    jvmtiError result;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    result = jvmti_env->GetArgumentsSize(method, &size);
    fprintf(stderr, "\tnative: GetArgumentsSize result = %d (must be zero) \n", result);
    fprintf(stderr, "\tnative: method ID is %p \n", method);
    fprintf(stderr, "\tnative: size is %d \n", size);
    fflush(stderr);

    if (result != JVMTI_ERROR_NONE) return;

    if ( size == 8 ) test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:30,代码来源:GetArgumentsSize0101.cpp

示例8: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;

    if (flag) return;

    char* name;
    char* signature;
    char* generic;
    jvmtiError result;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    jvmtiError result_1 =
        jvmti_env->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD);
    fprintf(stderr, "\tnative: GenerateEvents result = %d (must be zero) \n", result_1);
    fprintf(stderr, "\tnative: JVMTI_EVENT_COMPILED_METHOD_LOAD \n");

    jvmtiError result_2 =
        jvmti_env->GenerateEvents(JVMTI_EVENT_DYNAMIC_CODE_GENERATED);
    fprintf(stderr, "\tnative: GenerateEvents result = %d (must be zero) \n", result_2);
    fprintf(stderr, "\tnative: JVMTI_EVENT_DYNAMIC_CODE_GENERATED \n");

    if ( (result_1 == JVMTI_ERROR_NONE) && (result_2 == JVMTI_ERROR_NONE) )
        test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:33,代码来源:GenerateEvents0101.cpp

示例9: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;
    if (flag) return;
    jvmtiError result;
    jvmtiTimerInfo info;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    result = jvmti_env->GetCurrentThreadCpuTimerInfo(&info);
    fprintf(stderr, "\tnative: GetCurrentThreadCpuTimerInfo result = %d (must be zero) \n", result);
    if (result != JVMTI_ERROR_NONE) return;
    fprintf(stderr, "\tnative: max_value is         %lld \n", (long long)info.max_value);
    fprintf(stderr, "\tnative: may_skip_forward is  %d \n", info.may_skip_forward);
    fprintf(stderr, "\tnative: may_skip_backward is %d \n", info.may_skip_backward);
    fprintf(stderr, "\tnative: kind              is %d \n", info.kind);

    test = true;


}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:28,代码来源:GetCurThrCPUTimInfo0101.cpp

示例10: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;
    if (flag) return;
    char* signature;
    char* generic;
    jlocation start = (jlocation)100;
    jlocation finis = (jlocation)-1;
    jvmtiError result;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    result = jvmti_env->GetMethodLocation(method, &start, &finis);
    fprintf(stderr, "\tnative: GetMethodLocation result = %d (must be zero) \n", result);
    fprintf(stderr, "\tnative: method ID is %p \n", method);
    fprintf(stderr, "\tnative: start location is %lld \n", start);
    fprintf(stderr, "\tnative: finish location is %lld \n", finis);
    fflush(stderr);

    if ((result == JVMTI_ERROR_NONE) && (start == 0) && (finis != 0)) test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:28,代码来源:GetMethodLocation0101.cpp

示例11: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;

    if (flag) return;

    char *name;
    char *signature;
    char *generic;
    jniNativeInterface *function_table;
    jvmtiError result;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    result = jvmti_env->GetJNIFunctionTable(&function_table);

    fprintf(stderr, "\tnative: GetJNIFunctionTable result = %d (must be zero) \n", result);
    fprintf(stderr, "\tnative: function_table %p \n", function_table);

    if (result == JVMTI_ERROR_NONE)
        if (function_table != NULL) test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:29,代码来源:GetJNIFunctionTable0101.cpp

示例12: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;
    if (flag) return;
    char* signature;
    char* generic;
    jboolean obsolete = true;
    jvmtiError result;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    CAPABILITY_TURN_OFF_VOID(can_redefine_classes);

    result = jvmti_env->IsMethodObsolete(method, &obsolete);
    fprintf(stderr, "\tnative: IsMethodObsolete result = %d (must be JVMTI_ERROR_MUST_POSSESS_CAPABILITY (99)) \n", result);
    fflush(stderr);

    if (result == JVMTI_ERROR_MUST_POSSESS_CAPABILITY) test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:26,代码来源:IsMethodObsolete0102.cpp

示例13: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;

    if (flag) return;

    jvmtiError result;
    jclass myclass = NULL;
    jfieldID myfield = NULL;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    if (!is_needed_field_found(jvmti_env, "SetFieldModificationWatch0105.java", "third_field", &myclass, &myfield, DEBUG_OUT))
        return;

    result = jvmti_env->SetFieldModificationWatch(myclass, NULL);
    fprintf(stderr, "\tnative: SetFieldModificationWatch result = %d (must be JVMTI_ERROR_INVALID_FIELDID (25)) \n", result);
    if (result == JVMTI_ERROR_INVALID_FIELDID) test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:26,代码来源:SetFieldModificationWatch0105.cpp

示例14: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;
    if (flag) return;
    char* signature;
    char* generic;
    jint count;
    jvmtiLocalVariableEntry* table;
    jint loc_counter = 0;
    jvmtiError result;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                                      "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    result = jvmti_env->GetLocalVariableTable((jmethodID)jvmti_env, &count, &table);
    fprintf(stderr, "\tnative: GetLocalVariableTable result = %d (must be JVMTI_ERROR_INVALID_METHODID (23)) \n", result);
    fflush(stderr);
    if (result == JVMTI_ERROR_INVALID_METHODID) test = true;
}
开发者ID:mkloeppner,项目名称:drlvm-vts-bundle,代码行数:25,代码来源:GetLocalVariableTable0104.cpp

示例15: callbackException

void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;

    if (flag) return;

    char* signature;
    char* generic;
    jint classes_count = 0;
    jclass* classes;
    jvmtiError result;
    jclass myclass;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    flag = true;
    util = true;

    result = jvmti_env->GetLoadedClasses(&classes_count, &classes);
    fprintf(stderr, "\tnative: GetLoadedClasses result = %d (must be zero) \n", result);
    fprintf(stderr, "\tnative: classes count is %d \n", classes_count);
    fprintf(stderr, "\tnative: classes ptr is %p \n", classes);
    if (result != JVMTI_ERROR_NONE) return;

    for (int i = 0; i < classes_count; i++)
    {
        result = jvmti_env->GetClassSignature(classes[i], &signature, &generic);
        if (DEBUG_OUT)
        {
            fprintf(stderr, "\tnative: GetClassSignature result = %d (must be zero) \n", result);
            fprintf(stderr, "\tnative: classes ptr is %p \n", classes);
            fprintf(stderr, "\tnative: signature is %s \n", signature);
            fprintf(stderr, "\tnative: generic is %s \n", generic);
            fflush(stderr);
        }

        if (result != JVMTI_ERROR_NONE) continue;

        if (strncmp(signature, "[I", 2)) continue;
        fprintf(stderr, "\tnative: GetClassSignature result = %d (must be zero) \n", result);
        fprintf(stderr, "\tnative: classes ptr is %p \n", classes);
        fprintf(stderr, "\tnative: signature is %s \n", signature);
        fprintf(stderr, "\tnative: generic is %s \n", generic);
        fflush(stderr);
        myclass = classes[i];
        break;
    }

    result = jvmti_env->IsArrayClass( myclass, NULL );
    fprintf(stderr, "\tnative: IsInterface result = %d (must be JVMTI_ERROR_NULL_POINTER (100)) \n", result);
    fflush(stderr);

    if (result != JVMTI_ERROR_NULL_POINTER ) return;
    test = true;
}
开发者ID:BlueRiverInteractive,项目名称:drlvm-vts-bundle,代码行数:59,代码来源:IsArrayClass0103.cpp


注:本文中的check_phase_and_method_debug函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。