< prev index next >

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

Print this page

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

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

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