public TargetAddress MonoClassGetFieldType(TargetMemoryAccess memory, TargetAddress klass,
int index)
{
int offset = index * MonoMetadataInfo.FieldInfoSize +
MonoMetadataInfo.FieldInfoTypeOffset;
TargetAddress fields = memory.ReadAddress (
klass + MonoMetadataInfo.KlassFieldOffset);
if (fields.IsNull)
throw new TargetException (TargetError.ClassNotInitialized);
return memory.ReadAddress (fields + offset);
}