Author: martin
Date: 2007-09-27 04:07:18 -0400 (Thu, 27 Sep 2007)
New Revision: 86463

Modified:
   trunk/debugger/ChangeLog
   trunk/debugger/languages/mono/MonoObjectObject.cs
   trunk/debugger/languages/mono/MonoSymbolFile.cs
   trunk/debugger/languages/mono/MonoType.cs
Log:
2007-09-27  Martin Baulig  <[EMAIL PROTECTED]>

        * languages/mono/MonoFundamentalType.cs
        (MonoFundamentalType): Replace the public .ctor with a static
        Create() method.        

        * languages/mono/MonoStringType.cs
        (MonoStringType): Replace the public .ctor with a static
        Create() method.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2007-09-27 07:44:53 UTC (rev 86462)
+++ trunk/debugger/ChangeLog    2007-09-27 08:07:18 UTC (rev 86463)
@@ -1,5 +1,14 @@
 2007-09-27  Martin Baulig  <[EMAIL PROTECTED]>
 
+       * languages/mono/MonoType.cs
+       (MonoType.Read): Renamed into ReadType().
+       (MonoType.ReadMonoClass): New public static method.
+
+       * languages/mono/MonoObjectObject.cs
+       (MonoObjectObject.GetCurrentType): Use MonoType.ReadMonoClass().
+
+2007-09-27  Martin Baulig  <[EMAIL PROTECTED]>
+
        * languages/mono/MonoFundamentalType.cs
        (MonoFundamentalType): Replace the public .ctor with a static
        Create() method.        

Modified: trunk/debugger/languages/mono/MonoObjectObject.cs
===================================================================
--- trunk/debugger/languages/mono/MonoObjectObject.cs   2007-09-27 07:44:53 UTC 
(rev 86462)
+++ trunk/debugger/languages/mono/MonoObjectObject.cs   2007-09-27 08:07:18 UTC 
(rev 86463)
@@ -26,7 +26,7 @@
                        address = target.ReadAddress (Location.GetAddress 
(target));
                        address = target.ReadAddress (address);
 
-                       return Type.File.MonoLanguage.ReadMonoClass (target, 
address);
+                       return MonoType.ReadMonoClass (Type.File.MonoLanguage, 
target, address);
                }
 
                public override TargetObject GetDereferencedObject (Thread 
target)

Modified: trunk/debugger/languages/mono/MonoSymbolFile.cs
===================================================================
--- trunk/debugger/languages/mono/MonoSymbolFile.cs     2007-09-27 07:44:53 UTC 
(rev 86462)
+++ trunk/debugger/languages/mono/MonoSymbolFile.cs     2007-09-27 08:07:18 UTC 
(rev 86463)
@@ -1001,7 +1001,7 @@
                                parameters = new TargetVariable 
[param_info.Count];
                                for (int i = 0; i < param_info.Count; i++) {
                                        VariableInfo var = 
address.ParamVariableInfo [i];
-                                       TargetType type = MonoType.Read (mono, 
memory, var.MonoType);
+                                       TargetType type = MonoType.ReadType 
(mono, memory, var.MonoType);
                                        if (type == null)
                                                type = mono.VoidType;
 
@@ -1015,7 +1015,7 @@
                                        C.LocalVariableEntry local = 
method.Locals [i];
 
                                        VariableInfo var = 
address.LocalVariableInfo [local.Index];
-                                       TargetType type = MonoType.Read (mono, 
memory, var.MonoType);
+                                       TargetType type = MonoType.ReadType 
(mono, memory, var.MonoType);
                                        if (type == null)
                                                type = mono.VoidType;
 

Modified: trunk/debugger/languages/mono/MonoType.cs
===================================================================
--- trunk/debugger/languages/mono/MonoType.cs   2007-09-27 07:44:53 UTC (rev 
86462)
+++ trunk/debugger/languages/mono/MonoType.cs   2007-09-27 08:07:18 UTC (rev 
86463)
@@ -48,9 +48,17 @@
 
        internal static class MonoType
        {
-               public static TargetType Read (MonoLanguageBackend mono, 
TargetMemoryAccess memory,
-                                              TargetAddress address)
+               public static TargetType ReadMonoClass (MonoLanguageBackend 
mono,
+                                                       TargetMemoryAccess 
memory,
+                                                       TargetAddress address)
                {
+                       int byval_offset = 
mono.MonoMetadataInfo.KlassByValArgOffset;
+                       return ReadType (mono, memory, address + byval_offset);
+               }
+
+               public static TargetType ReadType (MonoLanguageBackend mono, 
TargetMemoryAccess memory,
+                                                  TargetAddress address)
+               {
                        TargetAddress data = memory.ReadAddress (address);
                        uint flags = (uint) memory.ReadInteger (address + 
memory.TargetInfo.TargetAddressSize);
 
@@ -109,7 +117,7 @@
                                return mono.BuiltinTypes.UIntType;
 
                        case MonoTypeEnum.MONO_TYPE_PTR: {
-                               TargetType target_type = Read (mono, memory, 
data);
+                               TargetType target_type = ReadType (mono, 
memory, data);
                                return new MonoPointerType (target_type);
                        }
 

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

Reply via email to