Author: martin
Date: 2006-04-25 08:37:19 -0400 (Tue, 25 Apr 2006)
New Revision: 59851

Modified:
   trunk/debugger/frontend/Interpreter.cs
   trunk/debugger/test/testsuite/NUnit.cs
   trunk/debugger/test/testsuite/testnativeattach.cs
Log:
Attaching is now working.

Modified: trunk/debugger/frontend/Interpreter.cs
===================================================================
--- trunk/debugger/frontend/Interpreter.cs      2006-04-25 12:35:31 UTC (rev 
59850)
+++ trunk/debugger/frontend/Interpreter.cs      2006-04-25 12:37:19 UTC (rev 
59851)
@@ -341,6 +341,7 @@
 
                                current_process = main_process = 
debugger.Attach (Options, pid);
                                current_thread = current_process.MainThread;
+                               Wait (current_thread);
 
                                return current_process;
                        } catch (TargetException e) {

Modified: trunk/debugger/test/testsuite/NUnit.cs
===================================================================
--- trunk/debugger/test/testsuite/NUnit.cs      2006-04-25 12:35:31 UTC (rev 
59850)
+++ trunk/debugger/test/testsuite/NUnit.cs      2006-04-25 12:37:19 UTC (rev 
59851)
@@ -302,8 +302,10 @@
                                Assert.Fail ("Thread {0} stopped at {1}, but 
expected thread {2} to stop.",
                                             thread, frame, exp_thread.ID);
 
-                       AssertFrame (exp_thread, exp_func, exp_line);
-                       AssertFrame (frame, 0, exp_func, exp_line);
+                       if (exp_func != null) {
+                               AssertFrame (exp_thread, exp_func, exp_line);
+                               AssertFrame (frame, 0, exp_func, exp_line);
+                       }
                }
 
                public void AssertHitBreakpoint (Thread exp_thread, int 
exp_index,

Modified: trunk/debugger/test/testsuite/testnativeattach.cs
===================================================================
--- trunk/debugger/test/testsuite/testnativeattach.cs   2006-04-25 12:35:31 UTC 
(rev 59850)
+++ trunk/debugger/test/testsuite/testnativeattach.cs   2006-04-25 12:37:19 UTC 
(rev 59851)
@@ -39,6 +39,8 @@
                        Process process = Interpreter.Attach (child.Id);
                        Assert.IsTrue (process.MainThread.IsStopped);
 
+                       AssertStopped (process.MainThread, null, -1);
+
                        StackFrame frame = process.MainThread.CurrentFrame;
                        Assert.IsNotNull (frame);
                        Backtrace bt = process.MainThread.GetBacktrace (-1);
@@ -57,6 +59,8 @@
                        Process process = Interpreter.Attach (child.Id);
                        Assert.IsTrue (process.MainThread.IsStopped);
 
+                       AssertStopped (process.MainThread, null, -1);
+
                        StackFrame frame = process.MainThread.CurrentFrame;
                        Assert.IsNotNull (frame);
                        Backtrace bt = process.MainThread.GetBacktrace (-1);
@@ -75,6 +79,8 @@
                        Process process = Interpreter.Attach (child.Id);
                        Assert.IsTrue (process.MainThread.IsStopped);
 
+                       AssertStopped (process.MainThread, null, -1);
+
                        StackFrame frame = process.MainThread.CurrentFrame;
                        Assert.IsNotNull (frame);
                        Backtrace bt = process.MainThread.GetBacktrace (-1);

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

Reply via email to