Author: martin
Date: 2007-10-11 06:29:04 -0400 (Thu, 11 Oct 2007)
New Revision: 87329
Added:
branches/martin/debugger-terrania/test/A.cs
branches/martin/debugger-terrania/test/C.cs
branches/martin/debugger-terrania/test/D.cs
branches/martin/debugger-terrania/test/E.cs
branches/martin/debugger-terrania/test/G.cs
branches/martin/debugger-terrania/test/H.cs
Modified:
branches/martin/debugger-terrania/frontend/Style.cs
branches/martin/debugger-terrania/languages/mono/MonoClassType.cs
Log:
Modified: branches/martin/debugger-terrania/frontend/Style.cs
===================================================================
--- branches/martin/debugger-terrania/frontend/Style.cs 2007-10-11 10:24:31 UTC
(rev 87328)
+++ branches/martin/debugger-terrania/frontend/Style.cs 2007-10-11 10:29:04 UTC
(rev 87329)
@@ -234,7 +234,7 @@
protected string FormatMember (string prefix, TargetMemberInfo
member,
bool is_static, Hashtable hash)
{
- string tname = member.Type.Name;
+ string tname = member.Type != null ? member.Type.Name :
"<unknown type>";
TargetFieldInfo fi = member as TargetFieldInfo;
if ((fi != null) && fi.HasConstValue)
return String.Format (
@@ -291,7 +291,8 @@
TargetFunctionType ftype = method.Type;
if (!is_ctor) {
if (ftype.HasReturnValue)
- sb.Append (ftype.ReturnType.Name);
+ sb.Append (ftype.ReturnType != null ?
+ ftype.ReturnType.Name :
"<unknown type>");
else
sb.Append ("void");
sb.Append (" ");
Modified: branches/martin/debugger-terrania/languages/mono/MonoClassType.cs
===================================================================
--- branches/martin/debugger-terrania/languages/mono/MonoClassType.cs
2007-10-11 10:24:31 UTC (rev 87328)
+++ branches/martin/debugger-terrania/languages/mono/MonoClassType.cs
2007-10-11 10:29:04 UTC (rev 87329)
@@ -144,6 +144,8 @@
i++;
}
+
+ Console.WriteLine ("GET FIELDS DONE: {0}", this);
}
public override TargetFieldInfo[] Fields {
Added: branches/martin/debugger-terrania/test/A.cs
===================================================================
--- branches/martin/debugger-terrania/test/A.cs 2007-10-11 10:24:31 UTC (rev
87328)
+++ branches/martin/debugger-terrania/test/A.cs 2007-10-11 10:29:04 UTC (rev
87329)
@@ -0,0 +1,30 @@
+using System;
+
+public class Foo
+{
+ public static void Hello<S> (S s)
+ {
+ Console.WriteLine (s);
+ }
+
+ public static void Hello<T,U> (T t, U u)
+ {
+ Console.WriteLine ("TEST: {0} {1}", t, u);
+ }
+
+}
+
+class X
+{
+ static void Main ()
+ {
+ Foo.Hello (5);
+ Foo.Hello ("World");
+
+ Foo.Hello (8);
+ Foo.Hello ("Test");
+
+ Foo.Hello (5, "World");
+ Foo.Hello ("Test", 8);
+ }
+}
Added: branches/martin/debugger-terrania/test/C.cs
===================================================================
--- branches/martin/debugger-terrania/test/C.cs 2007-10-11 10:24:31 UTC (rev
87328)
+++ branches/martin/debugger-terrania/test/C.cs 2007-10-11 10:29:04 UTC (rev
87329)
@@ -0,0 +1,77 @@
+using System;
+
+public struct Foo
+{
+ public readonly int A;
+
+ public Foo (int a)
+ {
+ this.A = a;
+ }
+}
+
+public class Bar
+{
+ public readonly int A;
+
+ public Bar (int a)
+ {
+ this.A = a;
+ }
+}
+
+public enum Drinks
+{
+ Beer,
+ Whine
+}
+
+public class Hello<T>
+{
+ public readonly T Data;
+
+ public Hello (T t)
+ {
+ this.Data = t;
+ }
+
+ public void Test ()
+ {
+ Console.WriteLine (Data);
+ }
+}
+
+public class Test
+{
+ public static void Hello<S> (S s)
+ {
+ Console.WriteLine (s);
+ }
+}
+
+class X
+{
+ static void Main ()
+ {
+ Hello<int> hello = new Hello<int> (3);
+ hello.Test ();
+ Test.Hello (hello);
+
+ Foo foo = new Foo (5);
+ Bar bar = new Bar (8);
+
+ Test.Hello (foo);
+ Test.Hello (bar);
+
+ Test.Hello ((object) bar);
+
+ int[] a = { 3, 8 };
+ Test.Hello (a);
+
+ int[,] b = { { 3, 8, 11 }, { 5, 9, 7 } };
+ Test.Hello (b);
+
+ Test.Hello (IntPtr.Zero);
+ Test.Hello (Drinks.Beer);
+ }
+}
Added: branches/martin/debugger-terrania/test/D.cs
===================================================================
--- branches/martin/debugger-terrania/test/D.cs 2007-10-11 10:24:31 UTC (rev
87328)
+++ branches/martin/debugger-terrania/test/D.cs 2007-10-11 10:29:04 UTC (rev
87329)
@@ -0,0 +1,34 @@
+using System;
+
+public class Hello<T>
+{
+ public readonly T Data;
+
+ public Hello (T t)
+ {
+ this.Data = t;
+ }
+
+ public void Test ()
+ {
+ Console.WriteLine (Data);
+ }
+}
+
+public class Test
+{
+ public static void Hello<S> (Hello<S> hello)
+ {
+ Console.WriteLine (hello);
+ }
+}
+
+class X
+{
+ static void Main ()
+ {
+ Hello<int> hello = new Hello<int> (3);
+ hello.Test ();
+ Test.Hello (hello);
+ }
+}
Added: branches/martin/debugger-terrania/test/E.cs
===================================================================
--- branches/martin/debugger-terrania/test/E.cs 2007-10-11 10:24:31 UTC (rev
87328)
+++ branches/martin/debugger-terrania/test/E.cs 2007-10-11 10:29:04 UTC (rev
87329)
@@ -0,0 +1,19 @@
+using System;
+
+public class Test
+{
+ public static void Array<S> (S[] array)
+ {
+ foreach (S s in array)
+ Console.WriteLine (s);
+ }
+}
+
+class X
+{
+ static void Main ()
+ {
+ int[] a = { 3, 4, 5 };
+ Test.Array (a);
+ }
+}
Added: branches/martin/debugger-terrania/test/G.cs
===================================================================
--- branches/martin/debugger-terrania/test/G.cs 2007-10-11 10:24:31 UTC (rev
87328)
+++ branches/martin/debugger-terrania/test/G.cs 2007-10-11 10:29:04 UTC (rev
87329)
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+
+class X
+{
+ static void Main ()
+ {
+ LinkedList<int> list = new LinkedList<int> ();
+ list.AddFirst (3);
+ Console.WriteLine (list);
+ }
+}
Added: branches/martin/debugger-terrania/test/H.cs
===================================================================
--- branches/martin/debugger-terrania/test/H.cs 2007-10-11 10:24:31 UTC (rev
87328)
+++ branches/martin/debugger-terrania/test/H.cs 2007-10-11 10:29:04 UTC (rev
87329)
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using C5;
+
+class X
+{
+ static void Main ()
+ {
+ TreeBag<int> bag = new TreeBag<int> ();
+ bag.Add (3);
+ Console.WriteLine (bag);
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches