Author: martin
Date: 2006-01-19 11:03:19 -0500 (Thu, 19 Jan 2006)
New Revision: 55788

Modified:
   trunk/debugger/ChangeLog
   trunk/debugger/backends/SingleSteppingEngine.cs
   trunk/debugger/test/TestBreakpoint.cs
   trunk/debugger/test/mono-debugger.tests/TestBreakpoint.exp
Log:
2006-01-19  Martin Baulig  <[EMAIL PROTECTED]>

        * backends/SingleSteppingEngine.cs
        (SingleSteppingEngine.do_continue): Only insert the temporary
        breakpoint if we're not stepping over a breakpoint; otherwise
        OperationStepOverBreakpoint takes care of that.

        * tests/mono-debugger.tests/TestBreakpoint.exp: Added some more
        test cases; this also addresses the underlying problem of #77056.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2006-01-19 15:26:09 UTC (rev 55787)
+++ trunk/debugger/ChangeLog    2006-01-19 16:03:19 UTC (rev 55788)
@@ -1,5 +1,15 @@
 2006-01-19  Martin Baulig  <[EMAIL PROTECTED]>
 
+       * backends/SingleSteppingEngine.cs
+       (SingleSteppingEngine.do_continue): Only insert the temporary
+       breakpoint if we're not stepping over a breakpoint; otherwise
+       OperationStepOverBreakpoint takes care of that.
+
+       * tests/mono-debugger.tests/TestBreakpoint.exp: Added some more
+       test cases; this also addresses the underlying problem of #77056.
+
+2006-01-19  Martin Baulig  <[EMAIL PROTECTED]>
+
        Fix #77056.
 
        * backends/SingleSteppingEngine.cs

Modified: trunk/debugger/backends/SingleSteppingEngine.cs
===================================================================
--- trunk/debugger/backends/SingleSteppingEngine.cs     2006-01-19 15:26:09 UTC 
(rev 55787)
+++ trunk/debugger/backends/SingleSteppingEngine.cs     2006-01-19 16:03:19 UTC 
(rev 55788)
@@ -772,7 +772,7 @@
                        Report.Debug (DebugFlags.SSE,
                                      "{0} stepping over {3}breakpoint {1} at 
{2} until {4}/{5}",
                                      this, index, inferior.CurrentFrame,
-                                     current ? "current " : "", trampoline, 
until);
+                                     current ? "current " : "", until, 
trampoline);
 
                        PushOperation (new OperationStepOverBreakpoint (index, 
trampoline, until));
                        return true;
@@ -1029,12 +1029,12 @@
                {
                        check_inferior ();
                        frames_invalid ();
-                       if (!until.IsNull)
-                               insert_temporary_breakpoint (until);
 
                        if (step_over_breakpoint (until, trampoline, true))
                                return;
 
+                       if (!until.IsNull)
+                               insert_temporary_breakpoint (until);
                        inferior.Continue ();
                }
 
@@ -1846,12 +1846,12 @@
 
                        Report.Debug (DebugFlags.SSE,
                                      "{0} stepping over breakpoint {1} at {5} 
until {2}/{3} ({4})",
-                                     sse, Index, is_trampoline, until, 
sse.current_method,
+                                     sse, Index, until, is_trampoline, 
sse.current_method,
                                      sse.inferior.CurrentFrame);
 
                        if (is_trampoline) {
+                               sse.do_continue (until);
                                until = TargetAddress.Null;
-                               sse.inferior.Continue ();
                                return;
                        }
 

Modified: trunk/debugger/test/TestBreakpoint.cs
===================================================================
--- trunk/debugger/test/TestBreakpoint.cs       2006-01-19 15:26:09 UTC (rev 
55787)
+++ trunk/debugger/test/TestBreakpoint.cs       2006-01-19 16:03:19 UTC (rev 
55788)
@@ -96,6 +96,16 @@
        {
                Martin.Baulig.Hello hello = new Martin.Baulig.Hello ();
                hello.Test ();
+               Y.Hello ();
+               hello.Test ();
                Console.WriteLine (hello);
        }
 }
+
+public class Y
+{
+       public static void Hello ()
+       {
+               Console.WriteLine ("Hello World");
+       }
+}

Modified: trunk/debugger/test/mono-debugger.tests/TestBreakpoint.exp
===================================================================
--- trunk/debugger/test/mono-debugger.tests/TestBreakpoint.exp  2006-01-19 
15:26:09 UTC (rev 55787)
+++ trunk/debugger/test/mono-debugger.tests/TestBreakpoint.exp  2006-01-19 
16:03:19 UTC (rev 55788)
@@ -73,6 +73,31 @@
 # we're runtime-invoke'ing it.
 mdb_send_and_expect "p hello.Trier.PortaNigra.URL" "(System.String) 
\"$porta_nigra_url\""
 
+mdb_send "break Y.Hello"
+set bpt_y_hello [mdb_expect_breakpoint]
+
+mdb_send "disable $bpt_y_hello"
+mdb_expect_prompt
+
+mdb_send "next"
+mdb_expect_line "Hello World"
+mdb_expect_stopped 0 "X.Main()" $file [expr $line_main_2 + 1]
+
+mdb_send "disable $bpt_1"
+mdb_expect_prompt
+mdb_send "disable $bpt_2"
+mdb_expect_prompt
+mdb_send "disable $bpt_3"
+mdb_expect_prompt
+mdb_send "disable $bpt_porta_nigra"
+mdb_expect_prompt
+mdb_send "next"
+mdb_expect_line $porta_nigra_url
+mdb_expect_line $city_center_url
+mdb_expect_line "Irish Pub"
+mdb_expect_line $roman_baths_url
+mdb_expect_stopped 0 "X.Main()" $file [expr $line_main_2 + 2]
+
 mdb_send "continue"
 mdb_expect_line "Martin.Baulig.Hello"
 mdb_expect_line "Process @4 terminated normally."

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

Reply via email to