Author: martin
Date: 2006-06-12 08:53:29 -0400 (Mon, 12 Jun 2006)
New Revision: 61625
Modified:
trunk/debugger/ChangeLog
trunk/debugger/backends/SingleSteppingEngine.cs
trunk/debugger/test/src/TestInvocation.cs
trunk/debugger/test/testsuite/TestInvocation.cs
Log:
2006-06-12 Martin Baulig <[EMAIL PROTECTED]>
* backends/SingleSteppingEngine.cs
(OperationRuntimeInvoke.DoProcessEvent): Also push the rti frame
if we hit a breakpoint at the invoke method.
* test/testsuite/TestInvocation.cs: Added testcase for that.
Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog 2006-06-12 08:38:50 UTC (rev 61624)
+++ trunk/debugger/ChangeLog 2006-06-12 12:53:29 UTC (rev 61625)
@@ -1,3 +1,11 @@
+2006-06-12 Martin Baulig <[EMAIL PROTECTED]>
+
+ * backends/SingleSteppingEngine.cs
+ (OperationRuntimeInvoke.DoProcessEvent): Also push the rti frame
+ if we hit a breakpoint at the invoke method.
+
+ * test/testsuite/TestInvocation.cs: Added testcase for that.
+
2006-06-01 Martin Baulig <[EMAIL PROTECTED]>
* backends/SingleSteppingEngine.cs
Modified: trunk/debugger/backends/SingleSteppingEngine.cs
===================================================================
--- trunk/debugger/backends/SingleSteppingEngine.cs 2006-06-12 08:38:50 UTC
(rev 61624)
+++ trunk/debugger/backends/SingleSteppingEngine.cs 2006-06-12 12:53:29 UTC
(rev 61625)
@@ -3051,16 +3051,15 @@
Report.Debug (DebugFlags.SSE,
"{0} hit breakpoint {1} at {2}
during runtime-invoke",
sse, cevent.Argument,
inferior.CurrentFrame);
-
- args = null;
- if (Debug)
- return EventResult.Completed;
- else {
- sse.do_continue ();
- return EventResult.Running;
- }
} else if ((cevent.Type ==
Inferior.ChildEventType.CHILD_STOPPED) &&
(cevent.Argument == 0)) {
+ Report.Debug (DebugFlags.SSE,
+ "{0} stopped at {1} during
runtime-invoke",
+ sse, inferior.CurrentFrame);
+ }
+
+ if ((cevent.Type ==
Inferior.ChildEventType.CHILD_HIT_BREAKPOINT) ||
+ (cevent.Type ==
Inferior.ChildEventType.CHILD_STOPPED)) {
if (inferior.CurrentFrame == invoke) {
Report.Debug (DebugFlags.SSE,
"{0} stopped at invoke
method {1}",
@@ -3068,10 +3067,6 @@
PushRuntimeInvoke (sse, inferior);
pushed_rti_frame = true;
- } else {
- Report.Debug (DebugFlags.SSE,
- "{0} stopped at {1}
during runtime-invoke",
- sse,
inferior.CurrentFrame);
}
args = null;
Modified: trunk/debugger/test/src/TestInvocation.cs
===================================================================
--- trunk/debugger/test/src/TestInvocation.cs 2006-06-12 08:38:50 UTC (rev
61624)
+++ trunk/debugger/test/src/TestInvocation.cs 2006-06-12 12:53:29 UTC (rev
61625)
@@ -42,11 +42,15 @@
StaticHello (a);
}
+ public static void BreakpointTest ()
+ { }
+
public static void Main ()
{
X x = new X ();
x.Test (5, "Hello World");
TestStatic (x, 9, "Boston");
StaticHello (9);
+ BreakpointTest ();
}
}
Modified: trunk/debugger/test/testsuite/TestInvocation.cs
===================================================================
--- trunk/debugger/test/testsuite/TestInvocation.cs 2006-06-12 08:38:50 UTC
(rev 61624)
+++ trunk/debugger/test/testsuite/TestInvocation.cs 2006-06-12 12:53:29 UTC
(rev 61625)
@@ -14,6 +14,17 @@
: base ("TestInvocation")
{ }
+ const int LineTest = 31;
+ const int LineTestStatic = 39;
+ const int LineBreakpointTest = 46;
+ const int LineMain = 50;
+ const int LineMain2 = 54;
+
+ int bpt_test;
+ int bpt_test_static;
+ int bpt_bpt_test;
+ int bpt_main;
+
[Test]
[Category("ManagedTypes")]
public void Main ()
@@ -23,12 +34,13 @@
Assert.IsTrue (process.MainThread.IsStopped);
Thread thread = process.MainThread;
- AssertStopped (thread, "X.Main()", 47);
- int bpt = AssertBreakpoint ("31");
+ AssertStopped (thread, "X.Main()", LineMain);
+ bpt_test = AssertBreakpoint (LineTest);
+ bpt_main = AssertBreakpoint (LineMain2);
AssertExecute ("continue");
- AssertHitBreakpoint (thread, bpt,
-
"X.Test(System.Int32,System.String)", 31);
+ AssertHitBreakpoint (thread, bpt_test,
+
"X.Test(System.Int32,System.String)", LineTest);
AssertPrint (thread, "a", "(System.Int32) 5");
AssertPrint (thread, "Hello (4)", "(System.Int32) 16");
@@ -50,7 +62,7 @@
AssertTargetOutput ("Hello: 4");
AssertTargetOutput ("Static Hello: 16");
- bpt = AssertBreakpoint ("39");
+ bpt_test_static = AssertBreakpoint (LineTestStatic);
AssertExecute ("continue");
AssertTargetOutput ("Foo: 5");
@@ -58,8 +70,8 @@
AssertTargetOutput ("Hello: 5");
AssertTargetOutput ("Static Hello: 5");
- AssertHitBreakpoint (thread, bpt,
-
"X.TestStatic(X,System.Int32,System.String)", 39);
+ AssertHitBreakpoint (thread, bpt_test_static,
+
"X.TestStatic(X,System.Int32,System.String)", LineTestStatic);
AssertPrint (thread, "a", "(System.Int32) 9");
AssertPrint (thread, "b", "(System.String) \"Boston\"");
@@ -70,6 +82,25 @@
AssertTargetOutput ("Hello: 9");
AssertTargetOutput ("Static Hello: 9");
AssertTargetOutput ("Static Hello: 9");
+
+ AssertHitBreakpoint (thread, bpt_main,
+ "X.Main()", LineMain2);
+
+ bpt_bpt_test = AssertBreakpoint ("BreakpointTest");
+ AssertExecute ("call BreakpointTest ()");
+
+ AssertHitBreakpoint (thread, bpt_bpt_test,
+ "X.BreakpointTest()",
LineBreakpointTest);
+
+ AssertExecute ("continue");
+ AssertStopped (thread, "X.Main()", LineMain2);
+ AssertExecute ("continue");
+
+ AssertHitBreakpoint (thread, bpt_bpt_test,
+ "X.BreakpointTest()",
LineBreakpointTest);
+
+ AssertExecute ("continue");
+
AssertTargetExited (thread.Process);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches