334 error = fieldSignature(clazz, field, NULL, &signature, NULL);
335 if (error != JVMTI_ERROR_NONE) {
336 outStream_setError(out, map2jdwpError(error));
337 return;
338 }
339 typeKey = jdwpTag(signature);
340 jvmtiDeallocate(signature);
341
342 if (isReferenceTag(typeKey)) {
343
344 jobject value = JNI_FUNC_PTR(env,GetObjectField)(env, object, field);
345 (void)outStream_writeByte(out, specificTypeKey(env, value));
346 (void)outStream_writeObjectRef(env, out, value);
347 return;
348
349 }
350
351 /*
352 * For primitive types, the type key is bounced back as is.
353 */
354
355 (void)outStream_writeByte(out, typeKey);
356
357 switch (typeKey) {
358 case JDWP_TAG(BYTE):
359 (void)outStream_writeByte(out,
360 JNI_FUNC_PTR(env,GetByteField)(env, object, field));
361 break;
362
363 case JDWP_TAG(CHAR):
364 (void)outStream_writeChar(out,
365 JNI_FUNC_PTR(env,GetCharField)(env, object, field));
366 break;
367
368 case JDWP_TAG(FLOAT):
369 (void)outStream_writeFloat(out,
370 JNI_FUNC_PTR(env,GetFloatField)(env, object, field));
371 break;
372
373 case JDWP_TAG(DOUBLE):
374 (void)outStream_writeDouble(out,
|
334 error = fieldSignature(clazz, field, NULL, &signature, NULL);
335 if (error != JVMTI_ERROR_NONE) {
336 outStream_setError(out, map2jdwpError(error));
337 return;
338 }
339 typeKey = jdwpTag(signature);
340 jvmtiDeallocate(signature);
341
342 if (isReferenceTag(typeKey)) {
343
344 jobject value = JNI_FUNC_PTR(env,GetObjectField)(env, object, field);
345 (void)outStream_writeByte(out, specificTypeKey(env, value));
346 (void)outStream_writeObjectRef(env, out, value);
347 return;
348
349 }
350
351 /*
352 * For primitive types, the type key is bounced back as is.
353 */
354 (void)outStream_writeByte(out, typeKey);
355
356 switch (typeKey) {
357 case JDWP_TAG(BYTE):
358 (void)outStream_writeByte(out,
359 JNI_FUNC_PTR(env,GetByteField)(env, object, field));
360 break;
361
362 case JDWP_TAG(CHAR):
363 (void)outStream_writeChar(out,
364 JNI_FUNC_PTR(env,GetCharField)(env, object, field));
365 break;
366
367 case JDWP_TAG(FLOAT):
368 (void)outStream_writeFloat(out,
369 JNI_FUNC_PTR(env,GetFloatField)(env, object, field));
370 break;
371
372 case JDWP_TAG(DOUBLE):
373 (void)outStream_writeDouble(out,
|