Author: martin
Date: 2007-10-09 12:23:59 -0400 (Tue, 09 Oct 2007)
New Revision: 87191

Modified:
   trunk/debugger/backend/MonoThreadManager.cs
   trunk/debugger/languages/mono/MonoClassInfo.cs
Log:
Reflect latest runtime changes.

Modified: trunk/debugger/backend/MonoThreadManager.cs
===================================================================
--- trunk/debugger/backend/MonoThreadManager.cs 2007-10-09 16:23:01 UTC (rev 
87190)
+++ trunk/debugger/backend/MonoThreadManager.cs 2007-10-09 16:23:59 UTC (rev 
87191)
@@ -258,8 +258,8 @@
        internal class MonoDebuggerInfo
        {
                // These constants must match up with those in 
mono/mono/metadata/mono-debug.h
-               public const int  MinDynamicVersion = 61;
-               public const int  MaxDynamicVersion = 61;
+               public const int  MinDynamicVersion = 62;
+               public const int  MaxDynamicVersion = 62;
                public const long DynamicMagic      = 0x7aff65af4253d427;
 
                public readonly TargetAddress NotificationAddress;
@@ -376,6 +376,8 @@
                public readonly int KlassGenericClassOffset;
                public readonly int KlassGenericContainerOffset;
                public readonly int FieldInfoSize;
+               public readonly int FieldInfoTypeOffset;
+               public readonly int FieldInfoOffsetOffset;
 
                public readonly int MonoDefaultsCorlibOffset;
                public readonly int MonoDefaultsObjectOffset;
@@ -436,6 +438,8 @@
                        KlassGenericClassOffset = reader.ReadInt32 ();
                        KlassGenericContainerOffset = reader.ReadInt32 ();
                        FieldInfoSize = reader.ReadInt32 ();
+                       FieldInfoTypeOffset = reader.ReadInt32 ();
+                       FieldInfoOffsetOffset = reader.ReadInt32 ();
 
                        KlassFieldCountOffset = KlassMethodCountOffset - 8;
 

Modified: trunk/debugger/languages/mono/MonoClassInfo.cs
===================================================================
--- trunk/debugger/languages/mono/MonoClassInfo.cs      2007-10-09 16:23:01 UTC 
(rev 87190)
+++ trunk/debugger/languages/mono/MonoClassInfo.cs      2007-10-09 16:23:59 UTC 
(rev 87191)
@@ -107,13 +107,14 @@
                        int field_count = target.ReadInteger (
                                KlassAddress + metadata.KlassFieldCountOffset);
 
-                       TargetBinaryReader field_blob = target.ReadMemory (
-                               field_info, field_count * 
metadata.FieldInfoSize).GetReader ();
+                       TargetReader field_blob = new TargetReader 
(target.ReadMemory (
+                               field_info, field_count * 
metadata.FieldInfoSize));
 
                        field_offsets = new int [field_count];
                        for (int i = 0; i < field_count; i++) {
-                               field_blob.Position = i * 
metadata.FieldInfoSize + 2 * address_size;
-                               field_offsets [i] = field_blob.ReadInt32 ();
+                               int offset = i * metadata.FieldInfoSize;
+                               field_offsets [i] = field_blob.PeekInteger (
+                                       offset + 
metadata.FieldInfoOffsetOffset);
                        }
                }
 

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

Reply via email to