Author: martin
Date: 2007-10-09 13:04:51 -0400 (Tue, 09 Oct 2007)
New Revision: 87198

Modified:
   branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
Log:


Modified: 
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
===================================================================
--- 
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs   
    2007-10-09 17:04:20 UTC (rev 87197)
+++ 
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs   
    2007-10-09 17:04:51 UTC (rev 87198)
@@ -20,23 +20,7 @@
 
                public override TargetObject GetField (TargetMemoryAccess 
target, TargetFieldInfo field)
                {
-                       Console.WriteLine ("GENERIC INST GET FIELD: {0} {1}", 
this, field);
-
-                       int offset = class_info.GetFieldOffsets (target) 
[field.Position];
-                       TargetType type = class_info.GetFieldTypes (target) 
[field.Position];
-
-                       Console.WriteLine ("GET FIELD: {0} {1} {2} {3}", this, 
field, type, offset);
-                       if (!Type.IsByRef)
-                               offset -= 2 * 
target.TargetInfo.TargetAddressSize;
-                       TargetLocation field_loc = Location.GetLocationAtOffset 
(offset);
-
-                       if (type.IsByRef)
-                               field_loc = field_loc.GetDereferencedLocation 
();
-
-                       if (field_loc.HasAddress && field_loc.GetAddress 
(target).IsNull)
-                               return null;
-
-                       return type.GetObject (target, field_loc);
+                       return ((MonoFieldInfo) field).DeclaringType.GetField 
(target, Location, field);
                }
 
                internal override long GetDynamicSize (TargetMemoryAccess 
target, TargetBlob blob,

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to