Author: martin Date: 2008-02-19 07:39:10 -0500 (Tue, 19 Feb 2008) New Revision: 96130
Modified: branches/martin/debugger-terrania/debugger/ChangeLog branches/martin/debugger-terrania/debugger/languages/mono/MonoSymbolFile.cs branches/martin/debugger-terrania/debugger/test/src/TestAnonymous.cs branches/martin/debugger-terrania/debugger/test/src/TestDelegate.cs branches/martin/debugger-terrania/debugger/test/src/TestSimpleGenerics.cs branches/martin/debugger-terrania/debugger/test/testsuite/TestAnonymous.cs branches/martin/debugger-terrania/debugger/test/testsuite/TestBreakpoint.cs branches/martin/debugger-terrania/debugger/test/testsuite/TestDelegate.cs branches/martin/debugger-terrania/debugger/test/testsuite/TestInvocation.cs branches/martin/debugger-terrania/debugger/test/testsuite/TestIterator.cs branches/martin/debugger-terrania/debugger/test/testsuite/TestSimpleGenerics.cs Log: 2008-02-19 Martin Baulig <[EMAIL PROTECTED]> * languages/mono/MonoSymbolFile.cs (MonoSymbolFile.GetMethodName): Use a format which is compatible with mcs's GetSignatureForError(). Modified: branches/martin/debugger-terrania/debugger/ChangeLog =================================================================== --- branches/martin/debugger-terrania/debugger/ChangeLog 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/ChangeLog 2008-02-19 12:39:10 UTC (rev 96130) @@ -1,3 +1,9 @@ +2008-02-19 Martin Baulig <[EMAIL PROTECTED]> + + * languages/mono/MonoSymbolFile.cs + (MonoSymbolFile.GetMethodName): Use a format which is compatible + with mcs's GetSignatureForError(). + 2008-02-18 Martin Baulig <[EMAIL PROTECTED]> * languages/mono/MonoSymbolFile.cs Modified: branches/martin/debugger-terrania/debugger/languages/mono/MonoSymbolFile.cs =================================================================== --- branches/martin/debugger-terrania/debugger/languages/mono/MonoSymbolFile.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/languages/mono/MonoSymbolFile.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -609,7 +609,7 @@ case "System.Double": return "double"; case "System.String": return "string"; case "System.Object": return "object"; - default: return t.FullName; + default: return RemoveGenericArity (t.FullName); } } @@ -621,35 +621,72 @@ if (first) first = false; else - sb.Append (","); + sb.Append (", "); sb.Append (GetTypeSignature (p.ParameterType).Replace ('+','/')); } sb.Append (")"); return sb.ToString (); } + internal static string RemoveGenericArity (string name) + { + int start = 0; + StringBuilder sb = null; + do { + int pos = name.IndexOf ('`', start); + if (pos < 0) { + if (start == 0) + return name; + + sb.Append (name.Substring (start)); + break; + } + + if (sb == null) + sb = new StringBuilder (); + sb.Append (name.Substring (start, pos-start)); + + pos++; + while ((pos < name.Length) && Char.IsNumber (name [pos])) + pos++; + + start = pos; + } while (start < name.Length); + + return sb.ToString (); + } + internal static string GetMethodName (Cecil.MethodDefinition mdef) { + StringBuilder sb = new StringBuilder (GetTypeSignature (mdef.DeclaringType)); if (mdef.DeclaringType.GenericParameters.Count > 0) { - StringBuilder sb = new StringBuilder (mdef.DeclaringType.FullName); sb.Append ('<'); bool first = true; foreach (Cecil.GenericParameter p in mdef.DeclaringType.GenericParameters) { if (first) first = false; else - sb.Append (","); + sb.Append (','); sb.Append (p.Name); } - sb.Append (">."); - sb.Append (mdef.Name); - sb.Append (GetMethodSignature (mdef)); - return sb.ToString (); - - ; + sb.Append ('>'); } - return mdef.DeclaringType.FullName + '.' + mdef.Name + - GetMethodSignature (mdef); + sb.Append ('.'); + sb.Append (mdef.Name); + if (mdef.GenericParameters.Count > 0) { + sb.Append ('<'); + bool first = true; + foreach (Cecil.GenericParameter p in mdef.GenericParameters) { + if (first) + first = false; + else + sb.Append (','); + sb.Append (p.Name); + } + sb.Append ('>'); + } + sb.Append (GetMethodSignature (mdef)); + return sb.ToString (); } Cecil.MethodDefinition FindCecilMethod (string full_name) @@ -879,7 +916,10 @@ this.method = method; this.source = source; this.mdef = mdef; - this.full_name = MonoSymbolFile.GetMethodName (mdef); + if (method.RealName != null) + this.full_name = method.RealName; + else + this.full_name = MonoSymbolFile.GetMethodName (mdef); this.function = function; this.klass = klass; } @@ -1114,7 +1154,6 @@ ScopeInfo info = new ScopeInfo (sv.Scope, scope_var, type); scopes.Add (sv.Scope, info); - scope_list.Add (info); } @@ -1136,6 +1175,12 @@ parameters.Add (cv); break; case C.CapturedVariable.CapturedKind.This: + if (!cv.Resolve (memory)) + throw new InternalError (); + if (cv.Type.HasClassType) + decl_type = cv.Type.ClassType; + else + decl_type = (TargetStructType) cv.Type; this_var = cv; continue; default: Modified: branches/martin/debugger-terrania/debugger/test/src/TestAnonymous.cs =================================================================== --- branches/martin/debugger-terrania/debugger/test/src/TestAnonymous.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/test/src/TestAnonymous.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -117,13 +117,13 @@ { Foo<long> foo = delegate (long r) { Console.WriteLine (r); // @MDB LINE: test4 foo - Bar<T> bar = delegate (T x) { + Bar<T> bar = delegate (T x) { // @MDB LINE: test4 foo2 Console.WriteLine (r); // @MDB LINE: test4 bar Console.WriteLine (t); Console.WriteLine (s); Console.WriteLine (x); }; - bar (t); // @MDB LINE: test4 foo2 + bar (t); // @MDB LINE: test4 foo3 }; foo (5); // @MDB BREAKPOINT: test4 } Modified: branches/martin/debugger-terrania/debugger/test/src/TestDelegate.cs =================================================================== --- branches/martin/debugger-terrania/debugger/test/src/TestDelegate.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/test/src/TestDelegate.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -30,5 +30,6 @@ x.Foo (4); Console.WriteLine ("Back in main"); x.Foo (11); + Console.WriteLine ("Back again"); } } Modified: branches/martin/debugger-terrania/debugger/test/src/TestSimpleGenerics.cs =================================================================== --- branches/martin/debugger-terrania/debugger/test/src/TestSimpleGenerics.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/test/src/TestSimpleGenerics.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -54,17 +54,17 @@ static void Main () { Foo<int> foo = new Foo<int> (5); // @MDB LINE: main - foo.Hello (); + foo.Hello (); // @MDB LINE: main1 Bar<int> bar = new Bar<int> (5); - bar.Hello (); // @MDB LINE: main2 + bar.Hello (); // @MDB BREAKPOINT: main2 Baz<int> baz = new Baz<int> (5); - baz.Data.World (8); // @MDB LINE: main3 + baz.Data.World (8); // @MDB BREAKPOINT: main3 baz.Hello (); Test test = new Test (); - test.Hello (); // @MDB LINE: main4 + test.Hello (); // @MDB BREAKPOINT: main4 Test.Hello (8); Test.Hello ("World"); } Modified: branches/martin/debugger-terrania/debugger/test/testsuite/TestAnonymous.cs =================================================================== --- branches/martin/debugger-terrania/debugger/test/testsuite/TestAnonymous.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/test/testsuite/TestAnonymous.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -25,14 +25,14 @@ Thread thread = process.MainThread; - AssertStopped (thread, "RunTests.Main()", GetLine ("main")); + AssertStopped (thread, "main", "RunTests.Main()"); AssertExecute ("continue"); // // Test1 // - AssertHitBreakpoint (thread, "test1", "Test1.X.Test1(R,int)"); + AssertHitBreakpoint (thread, "test1", "Test1.X.Test1<R>(R, int)"); AssertPrint (thread, "a", "(int) 2"); AssertPrint (thread, "b", "(int) 2"); @@ -40,12 +40,10 @@ AssertExecute ("continue"); AssertTargetOutput ("500"); - AssertHitBreakpoint (thread, "test1 after foo", "Test1.X.Test1(R,int)"); + AssertHitBreakpoint (thread, "test1 after foo", "Test1.X.Test1<R>(R, int)"); AssertExecute ("step"); - // FIXME: Print a better method name - AssertStopped (thread, "Test1.X/<>c__CompilerGenerated5`1<R>.<Test1>c__6()", - GetLine ("test1 foo")); + AssertStopped (thread, "test1 foo", "Test1.X.Test1<R>(R, int)~Test1.Foo()"); AssertPrint (thread, "a", "(int) 2"); AssertPrint (thread, "b", "(int) 2"); @@ -57,7 +55,7 @@ AssertTargetOutput ("500"); AssertTargetOutput ("2"); AssertTargetOutput ("500"); - AssertHitBreakpoint (thread, "test1", "Test1.X.Test1(R,int)"); + AssertHitBreakpoint (thread, "test1", "Test1.X.Test1<R>(R, int)"); AssertPrint (thread, "b", "(int) 1"); @@ -75,24 +73,22 @@ // Test2 // - AssertHitBreakpoint (thread, "test2", "Test2.X.Test(T)"); + AssertHitBreakpoint (thread, "test2", "Test2.X.Test<T>(T)"); AssertPrint (thread, "t", "(int) 3"); AssertPrint (thread, "u", "(int) 3"); AssertType (thread, "t", "int"); AssertType (thread, "u", "int"); AssertExecute ("continue"); - AssertHitBreakpoint (thread, "test2 hello", "Test2.X.Hello(U)"); + AssertHitBreakpoint (thread, "test2 hello", "Test2.X.Hello<U>(U)"); AssertPrint (thread, "u", "(int) 3"); AssertType (thread, "u", "int"); AssertExecute ("continue"); - AssertHitBreakpoint (thread, "test2 after foo", "Test2.X.Test(T)"); + AssertHitBreakpoint (thread, "test2 after foo", "Test2.X.Test<T>(T)"); AssertExecute ("step"); - AssertStopped (thread, - "Test2.X/<>c__CompilerGenerated1`1<T>.<Test>c__7()", - GetLine ("test2 foo")); + AssertStopped (thread, "test2 foo", "Test2.X.Test<T>(T)~Test2.Foo()"); AssertPrint (thread, "t", "(int) 3"); AssertType (thread, "t", "int"); @@ -100,17 +96,17 @@ AssertType (thread, "u", "int"); AssertExecute ("continue"); - AssertHitBreakpoint (thread, "test2 hello", "Test2.X.Hello(U)"); + AssertHitBreakpoint (thread, "test2 hello", "Test2.X.Hello<U>(U)"); AssertPrint (thread, "u", "(int) 3"); AssertType (thread, "u", "int"); AssertExecute ("continue"); - AssertHitBreakpoint (thread, "test2 hello", "Test2.X.Hello(U)"); + AssertHitBreakpoint (thread, "test2 hello", "Test2.X.Hello<U>(U)"); AssertPrint (thread, "u", "(int) 3"); AssertType (thread, "u", "int"); AssertExecute ("continue"); - AssertHitBreakpoint (thread, "test2 hello", "Test2.X.Hello(U)"); + AssertHitBreakpoint (thread, "test2 hello", "Test2.X.Hello<U>(U)"); AssertPrint (thread, "u", "(int) 3"); AssertType (thread, "u", "int"); @@ -120,22 +116,20 @@ // Test3 // - AssertHitBreakpoint (thread, "test3", "Test3.X.Test(T)"); + AssertHitBreakpoint (thread, "test3", "Test3.X.Test<T>(T)"); AssertPrint (thread, "t", "(int) 3"); AssertType (thread, "t", "int"); AssertExecute ("continue"); - AssertHitBreakpoint (thread, "test3 hello", "Test3.X.Hello(U)"); + AssertHitBreakpoint (thread, "test3 hello", "Test3.X.Hello<U>(U)"); AssertPrint (thread, "u", "(int) 3"); AssertType (thread, "u", "int"); AssertExecute ("continue"); - AssertHitBreakpoint (thread, "test3 after foo", "Test3.X.Test(T)"); + AssertHitBreakpoint (thread, "test3 after foo", "Test3.X.Test<T>(T)"); AssertExecute ("step"); - AssertStopped (thread, - "Test3.X/<>c__CompilerGenerated2`1<T>.<Test>c__8(S)", - GetLine ("test3 foo")); + AssertStopped (thread, "test3 foo", "Test3.X.Test<T>(T)~Test3.Foo<T>(T)"); AssertPrint (thread, "t", "(int) 3"); AssertType (thread, "t", "int"); @@ -143,12 +137,12 @@ AssertType (thread, "u", "int"); AssertExecute ("continue"); - AssertHitBreakpoint (thread, "test3 hello", "Test3.X.Hello(U)"); + AssertHitBreakpoint (thread, "test3 hello", "Test3.X.Hello<U>(U)"); AssertPrint (thread, "u", "(int) 3"); AssertType (thread, "u", "int"); AssertExecute ("continue"); - AssertHitBreakpoint (thread, "test3 hello", "Test3.X.Hello(U)"); + AssertHitBreakpoint (thread, "test3 hello", "Test3.X.Hello<U>(U)"); AssertPrint (thread, "u", "(int) 3"); AssertType (thread, "u", "int"); @@ -158,16 +152,15 @@ // Test4 // - AssertHitBreakpoint (thread, "test4", "Test4.Test`1<T>.Hello(T,S)"); + AssertHitBreakpoint (thread, "test4", "Test4.Test<T>.Hello<S>(T, S)"); AssertPrint (thread, "t", "(string) \"Kahalo\""); AssertType (thread, "t", "string"); AssertPrint (thread, "s", String.Format ("(double) {0}", System.Math.PI)); AssertType (thread, "s", "double"); AssertExecute ("step"); - AssertStopped (thread, - "Test4.Test`1/<>c__CompilerGenerated3`1<T,S>.<Hello>c__11(long)", - GetLine ("test4 foo")); + AssertStopped (thread, "test4 foo", + "Test4.Test<T>.Hello<S>(T, S)~Test4.Foo<long>(long)"); AssertPrint (thread, "r", "(long) 5"); AssertType (thread, "r", "long"); @@ -178,19 +171,16 @@ AssertExecute ("next"); AssertTargetOutput ("5"); - AssertStopped (thread, - "Test4.Test`1/<>c__CompilerGenerated3`1<T,S>.<Hello>c__11(long)", - GetLine ("test4 foo") + 1); + AssertStopped (thread, "test4 foo2", + "Test4.Test<T>.Hello<S>(T, S)~Test4.Foo<long>(long)"); AssertExecute ("next"); - AssertStopped (thread, - "Test4.Test`1/<>c__CompilerGenerated3`1<T,S>.<Hello>c__11(long)", - GetLine ("test4 foo2")); + AssertStopped (thread, "test4 foo3", + "Test4.Test<T>.Hello<S>(T, S)~Test4.Foo<long>(long)"); AssertExecute ("step"); - AssertStopped (thread, - "Test4.Test`1/<>c__CompilerGenerated3`1/<>c__CompilerGenerated9<T,S>.<Hello>c__10(T)", - GetLine ("test4 bar")); + AssertStopped (thread, "test4 bar", + "Test4.Test<T>.Hello<S>(T, S)~Test4.Bar<T>(T)"); AssertPrint (thread, "r", "(long) 5"); AssertType (thread, "r", "long"); Modified: branches/martin/debugger-terrania/debugger/test/testsuite/TestBreakpoint.cs =================================================================== --- branches/martin/debugger-terrania/debugger/test/testsuite/TestBreakpoint.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/test/testsuite/TestBreakpoint.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -58,15 +58,9 @@ line_porta_nigra); AssertExecute ("next"); - // Step over the breakpoint with "next" - AssertStopped (thread, "Europe.Germany.Trier.get_PortaNigra()", - line_porta_nigra + 1); + AssertStopped (thread, "Martin.Baulig.Hello.World(Postcard.Picture)", + line_world); - AssertExecute ("continue"); - AssertHitBreakpoint (thread, bpt_world, - "Martin.Baulig.Hello.World(Postcard.Picture)", - line_world); - AssertExecute ("disable " + bpt_world); AssertExecute ("continue"); AssertTargetOutput (porta_nigra_url); Modified: branches/martin/debugger-terrania/debugger/test/testsuite/TestDelegate.cs =================================================================== --- branches/martin/debugger-terrania/debugger/test/testsuite/TestDelegate.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/test/testsuite/TestDelegate.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -44,15 +44,11 @@ AssertNoTargetOutput (); AssertStopped (thread, "X.foo(int)", 18); AssertExecute ("step"); - AssertStopped (thread, "X.foo(int)", 19); - AssertExecute ("step"); AssertStopped (thread, "X.boston(int)", 23); AssertExecute ("next"); AssertTargetOutput ("Boston: 4"); AssertStopped (thread, "X.boston(int)", 24); AssertExecute ("step"); - AssertStopped (thread, "X.boston(int)", 25); - AssertExecute ("step"); AssertStopped (thread, "X.Main()", 31); AssertPrint (thread, "x.Foo (5)", "(long) 15"); @@ -75,19 +71,16 @@ AssertNoTargetOutput (); AssertStopped (thread, "X.foo(int)", 18); AssertExecute ("step"); - AssertStopped (thread, "X.foo(int)", 19); - AssertExecute ("step"); AssertStopped (thread, "X.boston(int)", 23); AssertExecute ("next"); AssertTargetOutput ("Boston: 11"); AssertNoTargetOutput (); AssertStopped (thread, "X.boston(int)", 24); AssertExecute ("step"); - AssertStopped (thread, "X.boston(int)", 25); - AssertExecute ("step"); AssertStopped (thread, "X.Main()", 33); AssertExecute ("continue"); + AssertTargetOutput ("Back again"); AssertTargetExited (thread.Process); } } Modified: branches/martin/debugger-terrania/debugger/test/testsuite/TestInvocation.cs =================================================================== --- branches/martin/debugger-terrania/debugger/test/testsuite/TestInvocation.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/test/testsuite/TestInvocation.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -39,7 +39,7 @@ bpt_main = AssertBreakpoint (LineMain2); AssertExecute ("continue"); - AssertHitBreakpoint (thread, bpt_test, "X.Test(int,string)", LineTest); + AssertHitBreakpoint (thread, bpt_test, "X.Test(int, string)", LineTest); AssertPrint (thread, "a", "(int) 5"); AssertPrint (thread, "Hello (4)", "(int) 16"); @@ -70,7 +70,7 @@ AssertTargetOutput ("Static Hello: 5"); AssertHitBreakpoint (thread, bpt_test_static, - "X.TestStatic(X,int,string)", LineTestStatic); + "X.TestStatic(X, int, string)", LineTestStatic); AssertPrint (thread, "a", "(int) 9"); AssertPrint (thread, "b", "(string) \"Boston\""); Modified: branches/martin/debugger-terrania/debugger/test/testsuite/TestIterator.cs =================================================================== --- branches/martin/debugger-terrania/debugger/test/testsuite/TestIterator.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/test/testsuite/TestIterator.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -38,8 +38,7 @@ AssertStopped (thread, "test1 loop", "Test1.X.Run()"); AssertExecute ("step"); - AssertStopped (thread, "test1 yield1", - "Test1.X/<>c__CompilerGenerated0.MoveNext()"); + AssertStopped (thread, "test1 yield1", "Test1.X.GetRange()"); AssertExecute ("step"); AssertStopped (thread, "test1 statement", "Test1.X.Run()"); @@ -48,12 +47,10 @@ AssertStopped (thread, "test1 loop", "Test1.X.Run()"); AssertExecute ("step"); - AssertStopped (thread, "test1 lexical", - "Test1.X/<>c__CompilerGenerated0.MoveNext()"); + AssertStopped (thread, "test1 lexical", "Test1.X.GetRange()"); AssertExecute ("step"); - AssertStopped (thread, "test1 yield2", - "Test1.X/<>c__CompilerGenerated0.MoveNext()"); + AssertStopped (thread, "test1 yield2", "Test1.X.GetRange()"); AssertPrint (thread, "a", "(int) 3"); @@ -64,8 +61,7 @@ AssertStopped (thread, "test1 loop", "Test1.X.Run()"); AssertExecute ("step"); - AssertStopped (thread, "test1 yield3", - "Test1.X/<>c__CompilerGenerated0.MoveNext()"); + AssertStopped (thread, "test1 yield3", "Test1.X.GetRange()"); AssertExecute ("step"); AssertStopped (thread, "test1 statement", "Test1.X.Run()"); @@ -88,20 +84,16 @@ AssertStopped (thread, "test2 loop", "Test2.X.Run()"); AssertExecute ("step"); - AssertStopped (thread, "test2 iterator start", - "Test2.X/<>c__CompilerGenerated1.MoveNext()"); + AssertStopped (thread, "test2 iterator start", "Test2.X.GetRange()"); AssertExecute ("step"); - AssertStopped (thread, "test2 iterator loop", - "Test2.X/<>c__CompilerGenerated1.MoveNext()"); + AssertStopped (thread, "test2 iterator loop", "Test2.X.GetRange()"); AssertExecute ("step"); - AssertStopped (thread, "test2 iterator if", - "Test2.X/<>c__CompilerGenerated1.MoveNext()"); + AssertStopped (thread, "test2 iterator if", "Test2.X.GetRange()"); AssertExecute ("step"); - AssertStopped (thread, "test2 iterator yield", - "Test2.X/<>c__CompilerGenerated1.MoveNext()"); + AssertStopped (thread, "test2 iterator yield", "Test2.X.GetRange()"); AssertExecute ("step"); AssertStopped (thread, "test2 statement", "Test2.X.Run()"); @@ -113,18 +105,17 @@ AssertStopped (thread, "test2 loop", "Test2.X.Run()"); AssertExecute ("step"); - AssertStopped (thread, "test2 iterator loop", - "Test2.X/<>c__CompilerGenerated1.MoveNext()"); + AssertStopped (thread, "test2 iterator loop", "Test2.X.GetRange()"); AssertExecute ("step"); - AssertStopped (thread, "test2 iterator if", - "Test2.X/<>c__CompilerGenerated1.MoveNext()"); + AssertStopped (thread, "test2 iterator if", "Test2.X.GetRange()"); + AssertPrint (thread, "total", "(int) 2"); + AssertPrint (thread, "stop", "(bool) true"); AssertPrint (thread, "this", "(Test2.X) { total = 2, stop = true }"); AssertExecute ("step"); - AssertStopped (thread, "test2 iterator break", - "Test2.X/<>c__CompilerGenerated1.MoveNext()"); + AssertStopped (thread, "test2 iterator break", "Test2.X.GetRange()"); AssertExecute ("step"); AssertStopped (thread, "test2 return", "Test2.X.Run()"); Modified: branches/martin/debugger-terrania/debugger/test/testsuite/TestSimpleGenerics.cs =================================================================== --- branches/martin/debugger-terrania/debugger/test/testsuite/TestSimpleGenerics.cs 2008-02-19 12:38:43 UTC (rev 96129) +++ branches/martin/debugger-terrania/debugger/test/testsuite/TestSimpleGenerics.cs 2008-02-19 12:39:10 UTC (rev 96130) @@ -14,10 +14,6 @@ : base ("TestSimpleGenerics") { } - int bpt_main_2; - int bpt_main_3; - int bpt_main_4; - [Test] [Category("Generics")] public void Main () @@ -28,13 +24,10 @@ Thread thread = process.MainThread; - AssertStopped (thread, "X.Main()", GetLine ("main")); - bpt_main_2 = AssertBreakpoint (GetLine ("main2")); - bpt_main_3 = AssertBreakpoint (GetLine ("main3")); - bpt_main_4 = AssertBreakpoint (GetLine ("main4")); + AssertStopped (thread, "main", "X.Main()"); AssertExecute ("next"); - AssertStopped (thread, "X.Main()", GetLine ("main") + 1); + AssertStopped (thread, "main1", "X.Main()"); AssertPrint (thread, "foo", "(Foo`1<int>) { Data = 5 }"); AssertPrint (thread, "$parent (foo)", "(System.Object) { }"); @@ -43,7 +36,7 @@ "{\n T Data;\n void Hello ();\n .ctor (T);\n}"); AssertExecute ("step"); - AssertStopped (thread, "Foo`1<T>.Hello()", GetLine ("foo hello")); + AssertStopped (thread, "foo hello", "Foo<T>.Hello()"); AssertPrint (thread, "this", "(Foo`1<int>) { Data = 5 }"); AssertType (thread, "this", @@ -52,7 +45,7 @@ AssertExecute ("continue"); AssertTargetOutput ("5"); - AssertHitBreakpoint (thread, bpt_main_2, "X.Main()", GetLine ("main2")); + AssertHitBreakpoint (thread, "main2", "X.Main()"); AssertPrint (thread, "bar", "(Bar`1<int>) { <Foo`1<int>> = { Data = 5 } }"); AssertPrint (thread, "$parent (bar)", "(Foo`1<int>) { Data = 5 }"); @@ -64,7 +57,7 @@ AssertExecute ("step"); - AssertStopped (thread, "Foo`1<T>.Hello()", GetLine ("foo hello")); + AssertStopped (thread, "foo hello", "Foo<T>.Hello()"); AssertPrint (thread, "this", "(Bar`1<int>) { <Foo`1<int>> = { Data = 5 } }"); AssertType (thread, "this", @@ -72,7 +65,7 @@ AssertExecute ("continue"); AssertTargetOutput ("5"); - AssertHitBreakpoint (thread, bpt_main_3, "X.Main()", GetLine ("main3")); + AssertHitBreakpoint (thread, "main3", "X.Main()"); AssertPrintRegex (thread, DisplayFormat.Object, "baz", @"\(Baz`1<int>\) { <Foo`1<Hello`1<int>>> = { Data = \(Hello`1<int>\) 0x[0-9a-f]+ } }"); @@ -86,7 +79,7 @@ AssertExecute ("continue"); AssertTargetOutput ("8"); AssertTargetOutput ("Hello`1[System.Int32]"); - AssertHitBreakpoint (thread, bpt_main_4, "X.Main()", GetLine ("main4")); + AssertHitBreakpoint (thread, "main4", "X.Main()"); AssertPrint (thread, "test", "(Test) { <Foo`1<int>> = { Data = 9 } }"); AssertPrint (thread, "$parent (test)", "(Foo`1<int>) { Data = 9 }"); _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches