< prev index next >

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

Print this page




 213 
 214     env = getEnv();
 215 
 216     arrayClass = inStream_readClassRef(env, in);
 217     if (inStream_error(in)) {
 218         return JNI_TRUE;
 219     }
 220     size = inStream_readInt(in);
 221     if (inStream_error(in)) {
 222         return JNI_TRUE;
 223     }
 224 
 225     error = classSignature(arrayClass, &signature, NULL);
 226     if ( error != JVMTI_ERROR_NONE ) {
 227         outStream_setError(out, map2jdwpError(error));
 228         return JNI_FALSE;
 229     }
 230     componentSignature = &signature[1];
 231 
 232     if ((componentSignature[0] == JDWP_TAG(OBJECT)) ||
 233         (componentSignature[0] == JDWP_TAG(ARRAY))) {

 234         writeNewObjectArray(env, out, arrayClass, size, componentSignature);
 235     } else {
 236         writeNewPrimitiveArray(env, out, arrayClass, size, componentSignature);
 237     }
 238 
 239     jvmtiDeallocate(signature);
 240     return JNI_TRUE;
 241 }
 242 
 243 void *ArrayType_Cmds[] = { (void *)0x1
 244                           ,(void *)newInstance};


 213 
 214     env = getEnv();
 215 
 216     arrayClass = inStream_readClassRef(env, in);
 217     if (inStream_error(in)) {
 218         return JNI_TRUE;
 219     }
 220     size = inStream_readInt(in);
 221     if (inStream_error(in)) {
 222         return JNI_TRUE;
 223     }
 224 
 225     error = classSignature(arrayClass, &signature, NULL);
 226     if ( error != JVMTI_ERROR_NONE ) {
 227         outStream_setError(out, map2jdwpError(error));
 228         return JNI_FALSE;
 229     }
 230     componentSignature = &signature[1];
 231 
 232     if ((componentSignature[0] == JDWP_TAG(OBJECT)) ||
 233         (componentSignature[0] == JDWP_TAG(ARRAY))  ||
 234         (componentSignature[0] == JDWP_TAG(INLINE_OBJECT))) {
 235         writeNewObjectArray(env, out, arrayClass, size, componentSignature);
 236     } else {
 237         writeNewPrimitiveArray(env, out, arrayClass, size, componentSignature);
 238     }
 239 
 240     jvmtiDeallocate(signature);
 241     return JNI_TRUE;
 242 }
 243 
 244 void *ArrayType_Cmds[] = { (void *)0x1
 245                           ,(void *)newInstance};
< prev index next >