< prev index next >

src/jdk.jdwp.agent/share/native/libjdwp/invoker.c

Print this page

        

*** 144,154 **** while (argumentTag != SIGNATURE_END_ARGS) { if ( argIndex > request->argumentCount ) { break; } if ((argumentTag == JDWP_TAG(OBJECT)) || ! (argumentTag == JDWP_TAG(ARRAY))) { /* Create a global ref for any non-null argument */ if (argument->l != NULL) { saveGlobalRef(env, argument->l, &argRefs[argIndex]); if (argRefs[argIndex] == NULL) { error = AGENT_ERROR_OUT_OF_MEMORY; --- 144,155 ---- while (argumentTag != SIGNATURE_END_ARGS) { if ( argIndex > request->argumentCount ) { break; } if ((argumentTag == JDWP_TAG(OBJECT)) || ! (argumentTag == JDWP_TAG(ARRAY)) || ! (argumentTag == JDWP_TAG(INLINE_OBJECT))) { /* Create a global ref for any non-null argument */ if (argument->l != NULL) { saveGlobalRef(env, argument->l, &argRefs[argIndex]); if (argRefs[argIndex] == NULL) { error = AGENT_ERROR_OUT_OF_MEMORY;
*** 177,187 **** argIndex = 0; argumentTag = firstArgumentTypeTag(request->methodSignature, &cursor); argument = request->arguments; while ( argIndex < request->argumentCount ) { if ((argumentTag == JDWP_TAG(OBJECT)) || ! (argumentTag == JDWP_TAG(ARRAY))) { argument->l = argRefs[argIndex]; } argument++; argIndex++; argumentTag = nextArgumentTypeTag(&cursor); --- 178,189 ---- argIndex = 0; argumentTag = firstArgumentTypeTag(request->methodSignature, &cursor); argument = request->arguments; while ( argIndex < request->argumentCount ) { if ((argumentTag == JDWP_TAG(OBJECT)) || ! (argumentTag == JDWP_TAG(ARRAY)) || ! (argumentTag == JDWP_TAG(INLINE_OBJECT))) { argument->l = argRefs[argIndex]; } argument++; argIndex++; argumentTag = nextArgumentTypeTag(&cursor);
*** 230,240 **** tossGlobalRef(env, &(request->instance)); } /* Delete global argument references */ while (argIndex < request->argumentCount) { if ((argumentTag == JDWP_TAG(OBJECT)) || ! (argumentTag == JDWP_TAG(ARRAY))) { if (argument->l != NULL) { tossGlobalRef(env, &(argument->l)); } } argument++; --- 232,243 ---- tossGlobalRef(env, &(request->instance)); } /* Delete global argument references */ while (argIndex < request->argumentCount) { if ((argumentTag == JDWP_TAG(OBJECT)) || ! (argumentTag == JDWP_TAG(ARRAY)) || ! (argumentTag == JDWP_TAG(INLINE_OBJECT))) { if (argument->l != NULL) { tossGlobalRef(env, &(argument->l)); } } argument++;
*** 404,414 **** static void invokeStatic(JNIEnv *env, InvokeRequest *request) { switch(returnTypeTag(request->methodSignature)) { case JDWP_TAG(OBJECT): ! case JDWP_TAG(ARRAY): { jobject object; JDI_ASSERT_MSG(request->clazz, "Request clazz null"); object = JNI_FUNC_PTR(env,CallStaticObjectMethodA)(env, request->clazz, request->method, --- 407,418 ---- static void invokeStatic(JNIEnv *env, InvokeRequest *request) { switch(returnTypeTag(request->methodSignature)) { case JDWP_TAG(OBJECT): ! case JDWP_TAG(ARRAY): ! case JDWP_TAG(INLINE_OBJECT): { jobject object; JDI_ASSERT_MSG(request->clazz, "Request clazz null"); object = JNI_FUNC_PTR(env,CallStaticObjectMethodA)(env, request->clazz, request->method,
*** 493,503 **** static void invokeVirtual(JNIEnv *env, InvokeRequest *request) { switch(returnTypeTag(request->methodSignature)) { case JDWP_TAG(OBJECT): ! case JDWP_TAG(ARRAY): { jobject object; JDI_ASSERT_MSG(request->instance, "Request instance null"); object = JNI_FUNC_PTR(env,CallObjectMethodA)(env, request->instance, request->method, --- 497,508 ---- static void invokeVirtual(JNIEnv *env, InvokeRequest *request) { switch(returnTypeTag(request->methodSignature)) { case JDWP_TAG(OBJECT): ! case JDWP_TAG(ARRAY): ! case JDWP_TAG(INLINE_OBJECT): { jobject object; JDI_ASSERT_MSG(request->instance, "Request instance null"); object = JNI_FUNC_PTR(env,CallObjectMethodA)(env, request->instance, request->method,
*** 581,591 **** static void invokeNonvirtual(JNIEnv *env, InvokeRequest *request) { switch(returnTypeTag(request->methodSignature)) { case JDWP_TAG(OBJECT): ! case JDWP_TAG(ARRAY): { jobject object; JDI_ASSERT_MSG(request->clazz, "Request clazz null"); JDI_ASSERT_MSG(request->instance, "Request instance null"); object = JNI_FUNC_PTR(env,CallNonvirtualObjectMethodA)(env, request->instance, --- 586,597 ---- static void invokeNonvirtual(JNIEnv *env, InvokeRequest *request) { switch(returnTypeTag(request->methodSignature)) { case JDWP_TAG(OBJECT): ! case JDWP_TAG(ARRAY): ! case JDWP_TAG(INLINE_OBJECT): { jobject object; JDI_ASSERT_MSG(request->clazz, "Request clazz null"); JDI_ASSERT_MSG(request->instance, "Request instance null"); object = JNI_FUNC_PTR(env,CallNonvirtualObjectMethodA)(env, request->instance,
*** 805,815 **** /* Release return value and exception references, but delay the release * until after the return packet was sent. */ mustReleaseReturnValue = request->invokeType == INVOKE_CONSTRUCTOR || returnTypeTag(request->methodSignature) == JDWP_TAG(OBJECT) || ! returnTypeTag(request->methodSignature) == JDWP_TAG(ARRAY); } /* * At this time, there's no need to retain global references on * arguments since the reply is processed. No one will deal with --- 811,822 ---- /* Release return value and exception references, but delay the release * until after the return packet was sent. */ mustReleaseReturnValue = request->invokeType == INVOKE_CONSTRUCTOR || returnTypeTag(request->methodSignature) == JDWP_TAG(OBJECT) || ! returnTypeTag(request->methodSignature) == JDWP_TAG(ARRAY) || ! returnTypeTag(request->methodSignature) == JDWP_TAG(INLINE_OBJECT); } /* * At this time, there's no need to retain global references on * arguments since the reply is processed. No one will deal with
< prev index next >