< prev index next >

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

Print this page

 346     error = fieldSignature(clazz, field, NULL, &signature, NULL);
 347     if (error != JVMTI_ERROR_NONE) {
 348         outStream_setError(out, map2jdwpError(error));
 349         return;
 350     }
 351     typeKey = jdwpTag(signature);
 352     jvmtiDeallocate(signature);
 353 
 354     if (isReferenceTag(typeKey)) {
 355 
 356         jobject value = JNI_FUNC_PTR(env,GetObjectField)(env, object, field);
 357         (void)outStream_writeByte(out, specificTypeKey(env, value));
 358         (void)outStream_writeObjectRef(env, out, value);
 359         return;
 360 
 361     }
 362 
 363     /*
 364      * For primitive types, the type key is bounced back as is.
 365      */
 366 
 367     (void)outStream_writeByte(out, typeKey);
 368 
 369     switch (typeKey) {
 370         case JDWP_TAG(BYTE):
 371             (void)outStream_writeByte(out,
 372                       JNI_FUNC_PTR(env,GetByteField)(env, object, field));
 373             break;
 374 
 375         case JDWP_TAG(CHAR):
 376             (void)outStream_writeChar(out,
 377                       JNI_FUNC_PTR(env,GetCharField)(env, object, field));
 378             break;
 379 
 380         case JDWP_TAG(FLOAT):
 381             (void)outStream_writeFloat(out,
 382                       JNI_FUNC_PTR(env,GetFloatField)(env, object, field));
 383             break;
 384 
 385         case JDWP_TAG(DOUBLE):
 386             (void)outStream_writeDouble(out,

 346     error = fieldSignature(clazz, field, NULL, &signature, NULL);
 347     if (error != JVMTI_ERROR_NONE) {
 348         outStream_setError(out, map2jdwpError(error));
 349         return;
 350     }
 351     typeKey = jdwpTag(signature);
 352     jvmtiDeallocate(signature);
 353 
 354     if (isReferenceTag(typeKey)) {
 355 
 356         jobject value = JNI_FUNC_PTR(env,GetObjectField)(env, object, field);
 357         (void)outStream_writeByte(out, specificTypeKey(env, value));
 358         (void)outStream_writeObjectRef(env, out, value);
 359         return;
 360 
 361     }
 362 
 363     /*
 364      * For primitive types, the type key is bounced back as is.
 365      */

 366     (void)outStream_writeByte(out, typeKey);
 367 
 368     switch (typeKey) {
 369         case JDWP_TAG(BYTE):
 370             (void)outStream_writeByte(out,
 371                       JNI_FUNC_PTR(env,GetByteField)(env, object, field));
 372             break;
 373 
 374         case JDWP_TAG(CHAR):
 375             (void)outStream_writeChar(out,
 376                       JNI_FUNC_PTR(env,GetCharField)(env, object, field));
 377             break;
 378 
 379         case JDWP_TAG(FLOAT):
 380             (void)outStream_writeFloat(out,
 381                       JNI_FUNC_PTR(env,GetFloatField)(env, object, field));
 382             break;
 383 
 384         case JDWP_TAG(DOUBLE):
 385             (void)outStream_writeDouble(out,
< prev index next >