Author: martin
Date: 2007-10-09 11:55:33 -0400 (Tue, 09 Oct 2007)
New Revision: 87176
Added:
branches/martin/debugger-terrania/languages/TargetGenericInstanceObject.cs
branches/martin/debugger-terrania/languages/TargetGenericInstanceType.cs
Modified:
branches/martin/debugger-terrania/frontend/ObjectFormatter.cs
branches/martin/debugger-terrania/frontend/Style.cs
branches/martin/debugger-terrania/languages/TargetObjectKind.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 15:53:46 UTC (rev 87175)
+++ branches/martin/debugger-terrania/frontend/ObjectFormatter.cs
2007-10-09 15:55:33 UTC (rev 87176)
@@ -192,6 +192,10 @@
FormatEnum (target, (TargetEnumObject) obj);
break;
+ case TargetObjectKind.GenericInstance:
+ FormatGenericInstance (target,
(TargetGenericInstanceObject) obj);
+ break;
+
default:
PrintObject (target, obj);
break;
@@ -344,5 +348,27 @@
Append ("<cannot display object>");
}
}
+
+ protected void FormatGenericInstance (Thread target,
TargetGenericInstanceObject obj)
+ {
+ Append ("{ ");
+ indent_level += 3;
+
+ bool first = true;
+
+ TargetFieldInfo[] fields =
obj.Type.ContainerType.Fields;
+ for (int i = 0; i < fields.Length; i++) {
+ if (!first) {
+ Append (", ");
+ CheckLineWrap ();
+ }
+ first = false;
+ Append (fields [i].Name + " = ");
+ Append ("<not-yet-implemented>");
+ }
+
+ Append (first ? "}" : " }");
+ indent_level -= 3;
+ }
}
}
Modified: branches/martin/debugger-terrania/frontend/Style.cs
===================================================================
--- branches/martin/debugger-terrania/frontend/Style.cs 2007-10-09 15:53:46 UTC
(rev 87175)
+++ branches/martin/debugger-terrania/frontend/Style.cs 2007-10-09 15:55:33 UTC
(rev 87176)
@@ -437,6 +437,12 @@
}
#endif
+ case TargetObjectKind.GenericInstance: {
+ TargetGenericInstanceType ginst =
(TargetGenericInstanceType) type;
+ retval = FormatType (target, prefix,
ginst.ContainerType, hash);
+ break;
+ }
+
default:
retval = type.Name;
break;
Added:
branches/martin/debugger-terrania/languages/TargetGenericInstanceObject.cs
===================================================================
--- branches/martin/debugger-terrania/languages/TargetGenericInstanceObject.cs
2007-10-09 15:53:46 UTC (rev 87175)
+++ branches/martin/debugger-terrania/languages/TargetGenericInstanceObject.cs
2007-10-09 15:55:33 UTC (rev 87176)
@@ -0,0 +1,14 @@
+namespace Mono.Debugger.Languages
+{
+ public abstract class TargetGenericInstanceObject : TargetObject
+ {
+ public readonly new TargetGenericInstanceType Type;
+
+ protected TargetGenericInstanceObject
(TargetGenericInstanceType type,
+ TargetLocation location)
+ : base (type, location)
+ {
+ this.Type = type;
+ }
+ }
+}
Added: branches/martin/debugger-terrania/languages/TargetGenericInstanceType.cs
===================================================================
--- branches/martin/debugger-terrania/languages/TargetGenericInstanceType.cs
2007-10-09 15:53:46 UTC (rev 87175)
+++ branches/martin/debugger-terrania/languages/TargetGenericInstanceType.cs
2007-10-09 15:55:33 UTC (rev 87176)
@@ -0,0 +1,14 @@
+namespace Mono.Debugger.Languages
+{
+ public abstract class TargetGenericInstanceType : TargetType
+ {
+ protected TargetGenericInstanceType (Language language)
+ : base (language, TargetObjectKind.GenericInstance)
+ { }
+
+ public abstract TargetClassType ContainerType {
+ get;
+ }
+
+ }
+}
Modified: branches/martin/debugger-terrania/languages/TargetObjectKind.cs
===================================================================
--- branches/martin/debugger-terrania/languages/TargetObjectKind.cs
2007-10-09 15:53:46 UTC (rev 87175)
+++ branches/martin/debugger-terrania/languages/TargetObjectKind.cs
2007-10-09 15:55:33 UTC (rev 87176)
@@ -11,6 +11,7 @@
Pointer,
Object,
Function,
- Alias
+ Alias,
+ GenericInstance
}
}
Modified:
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
===================================================================
---
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
2007-10-09 15:53:46 UTC (rev 87175)
+++
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceObject.cs
2007-10-09 15:55:33 UTC (rev 87176)
@@ -4,7 +4,7 @@
namespace Mono.Debugger.Languages.Mono
{
- internal class MonoGenericInstanceObject : TargetObject
+ internal class MonoGenericInstanceObject : TargetGenericInstanceObject
{
new public MonoGenericInstanceType Type;
Modified:
branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs
===================================================================
--- branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs
2007-10-09 15:53:46 UTC (rev 87175)
+++ branches/martin/debugger-terrania/languages/mono/MonoGenericInstanceType.cs
2007-10-09 15:55:33 UTC (rev 87176)
@@ -4,17 +4,21 @@
namespace Mono.Debugger.Languages.Mono
{
- internal class MonoGenericInstanceType : TargetType
+ internal class MonoGenericInstanceType : TargetGenericInstanceType
{
MonoClassType container;
public MonoGenericInstanceType (MonoClassType container,
MonoGenericContext context,
TargetAddress cached_ptr)
- : base (container.Language, TargetObjectKind.Unknown)
+ : base (container.Language)
{
this.container = container;
}
+ public override TargetClassType ContainerType {
+ get { return container; }
+ }
+
public override string Name {
get { return container.Name; }
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches