Author: martin
Date: 2007-10-10 12:09:43 -0400 (Wed, 10 Oct 2007)
New Revision: 87278

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


Modified: 
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
===================================================================
--- 
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs   
    2007-10-10 16:06:54 UTC (rev 87277)
+++ 
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs   
    2007-10-10 16:09:43 UTC (rev 87278)
@@ -27,7 +27,7 @@
                                return null;
 
                        MonoClassType parent_type = parent_info.ClassType;
-                       Console.WriteLine ("GET PARENT OBJECT #1: {0} {1}", 
parent_type,
+                       Console.WriteLine ("GET PARENT OBJECT #1: {0} {1} {2}", 
Type, parent_type,
                                           parent_info.GenericClass);
 
                        if (parent_info.GenericClass.IsNull)

Modified: 
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs
===================================================================
--- branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs 
2007-10-10 16:06:54 UTC (rev 87277)
+++ branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs 
2007-10-10 16:09:43 UTC (rev 87278)
@@ -10,6 +10,7 @@
                TargetAddress cached_ptr = TargetAddress.Null;
 
                MonoClassInfo class_info;
+               string full_name;
 
                public MonoGenericInstanceType (MonoClassType container, 
MonoGenericContext context,
                                                TargetAddress cached_ptr)
@@ -17,6 +18,16 @@
                {
                        this.container = container;
                        this.cached_ptr = cached_ptr;
+
+                       StringBuilder sb = new StringBuilder (container.Name);
+                       sb.Append ("<");
+                       for (int i = 0; i < context.ClassInst.Types.Length; 
i++) {
+                               if (i > 0)
+                                       sb.Append (",");
+                               sb.Append (context.ClassInst.Types [i].Name);
+                       }
+                       sb.Append (">");
+                       full_name = sb.ToString ();
                }
 
                public MonoGenericInstanceType (MonoClassType container, 
MonoGenericContext context,
@@ -32,7 +43,7 @@
                }
 
                public override string Name {
-                       get { return container.Name; }
+                       get { return full_name; }
                }
 
                public override bool IsByRef {
@@ -44,11 +55,11 @@
                }
 
                public override bool HasClassType {
-                       get { return false; }
+                       get { return true; }
                }
 
                public override TargetClassType ClassType {
-                       get { throw new InvalidOperationException (); }
+                       get { return container; }
                }
 
                public override int Size {

Modified: branches/martin/debugger-terrania/languages/mono/MonoSymbolFile.cs
===================================================================
--- branches/martin/debugger-terrania/languages/mono/MonoSymbolFile.cs  
2007-10-10 16:06:54 UTC (rev 87277)
+++ branches/martin/debugger-terrania/languages/mono/MonoSymbolFile.cs  
2007-10-10 16:09:43 UTC (rev 87278)
@@ -935,7 +935,7 @@
                        MethodSource source;
                        C.MethodEntry method;
                        Cecil.MethodDefinition mdef;
-                       TargetClassType decl_type;
+                       TargetType decl_type;
                        TargetVariable this_var;
                        TargetVariable[] parameters;
                        TargetVariable[] locals;
@@ -998,7 +998,7 @@
                                MonoLanguageBackend mono = file.MonoLanguage;
 
                                TargetAddress decl_klass = memory.ReadAddress 
(address.MonoMethod + 8);
-                               decl_type = MonoRuntime.ReadMonoClass (mono, 
memory, decl_klass).ClassType;
+                               decl_type = MonoRuntime.ReadMonoClass (mono, 
memory, decl_klass);
 
                                Cecil.ParameterDefinitionCollection param_info 
= mdef.Parameters;
                                parameters = new TargetVariable 
[param_info.Count];
@@ -1059,7 +1059,7 @@
                        public override TargetClassType GetDeclaringType 
(TargetMemoryAccess memory)
                        {
                                read_variables (memory);
-                               return decl_type;
+                               return decl_type.ClassType;
                        }
 
                        public override bool HasThis {

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

Reply via email to