Author: martin
Date: 2007-10-09 13:26:39 -0400 (Tue, 09 Oct 2007)
New Revision: 87204
Modified:
branches/martin/debugger-terrania/frontend/ObjectFormatter.cs
branches/martin/debugger-terrania/languages/TargetGenericInstanceObject.cs
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs
Log:
Modified: branches/martin/debugger-terrania/frontend/ObjectFormatter.cs
===================================================================
--- branches/martin/debugger-terrania/frontend/ObjectFormatter.cs
2007-10-09 17:24:12 UTC (rev 87203)
+++ branches/martin/debugger-terrania/frontend/ObjectFormatter.cs
2007-10-09 17:26:39 UTC (rev 87204)
@@ -356,6 +356,15 @@
bool first = true;
+ TargetObject parent = obj.GetParentObject (target);
+ Console.WriteLine ("PARENT: {0} {1}", obj, parent);
+ if ((parent != null) && (parent.Type !=
parent.Type.Language.ObjectType)) {
+ Append ("<{0}> = ", parent.Type.Name);
+ CheckLineWrap ();
+ FormatObjectRecursed (target, parent, false);
+ first = false;
+ }
+
TargetFieldInfo[] fields =
obj.Type.ContainerType.Fields;
for (int i = 0; i < fields.Length; i++) {
if (!first) {
Modified:
branches/martin/debugger-terrania/languages/TargetGenericInstanceObject.cs
===================================================================
--- branches/martin/debugger-terrania/languages/TargetGenericInstanceObject.cs
2007-10-09 17:24:12 UTC (rev 87203)
+++ branches/martin/debugger-terrania/languages/TargetGenericInstanceObject.cs
2007-10-09 17:26:39 UTC (rev 87204)
@@ -11,6 +11,8 @@
this.Type = type;
}
+ public abstract TargetObject GetParentObject (Thread target);
+
public abstract TargetObject GetField (TargetMemoryAccess
target, TargetFieldInfo field);
}
}
Modified:
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
===================================================================
---
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
2007-10-09 17:24:12 UTC (rev 87203)
+++
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
2007-10-09 17:26:39 UTC (rev 87204)
@@ -18,6 +18,23 @@
this.class_info = class_info;
}
+ public override TargetObject GetParentObject (Thread target)
+ {
+ MonoClassInfo parent_info = class_info.GetParent
(target);
+ Console.WriteLine ("GET PARENT OBJECT: {0} {1} {2}",
+ this, class_info, parent_info);
+ if (parent_info == null)
+ return null;
+
+ MonoClassType parent_type = parent_info.ClassType;
+ Console.WriteLine ("GET PARENT OBJECT #1: {0}",
parent_type);
+
+ MonoGenericInstanceType ginst = new
MonoGenericInstanceType (
+ parent_type, null, parent_info);
+
+ return new MonoGenericInstanceObject (ginst,
parent_info, Location);
+ }
+
public override TargetObject GetField (TargetMemoryAccess
target, TargetFieldInfo field)
{
return class_info.GetField (target, Location, field);
Modified:
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs
===================================================================
--- branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs
2007-10-09 17:24:12 UTC (rev 87203)
+++ branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs
2007-10-09 17:26:39 UTC (rev 87204)
@@ -7,7 +7,7 @@
internal class MonoGenericInstanceType : TargetGenericInstanceType
{
MonoClassType container;
- TargetAddress cached_ptr;
+ TargetAddress cached_ptr = TargetAddress.Null;
MonoClassInfo class_info;
@@ -19,6 +19,14 @@
this.cached_ptr = cached_ptr;
}
+ public MonoGenericInstanceType (MonoClassType container,
MonoGenericContext context,
+ MonoClassInfo class_info)
+ : base (container.Language)
+ {
+ this.container = container;
+ this.class_info = class_info;
+ }
+
public override TargetClassType ContainerType {
get { return container; }
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches