Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
2008-10-20 Martin Baulig <martin@ximian.com>
Browse files Browse the repository at this point in the history
	Applying a patch from Cedric Vivier <cedricv@neonux.com>

	* classes/Method.cs
	(Method.IsInvokeWrapper): New internal property.

	* backend/SingleSteppingEngine.cs
	(SSE.OperationStep): Enable stepping into method from objects
	deriving from MarshalByRefObject.


svn path=/trunk/debugger/; revision=116485
  • Loading branch information
Martin Baulig committed Oct 19, 2008
1 parent 3b76c1a commit b693599
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 8 deletions.
20 changes: 20 additions & 0 deletions ChangeLog
@@ -1,3 +1,16 @@
2008-10-20 Martin Baulig <martin@ximian.com>

Applying a patch from Cedric Vivier <cedricv@neonux.com>

* classes/Method.cs
(Method.IsInvokeWrapper): New internal property.

* backend/SingleSteppingEngine.cs
(SSE.OperationStep): Enable stepping into method from objects
deriving from MarshalByRefObject.

* test/{testsuite|src}/TestSSE.cs: Added testcase.

2008-10-20 Martin Baulig <martin@ximian.com> 2008-10-20 Martin Baulig <martin@ximian.com>


* interface/Report.cs: Include timestamps when writing to a file. * interface/Report.cs: Include timestamps when writing to a file.
Expand All @@ -12,6 +25,13 @@


* build/Makefile.am: Small fix from Ian Greenhoe; bug #431771. * build/Makefile.am: Small fix from Ian Greenhoe; bug #431771.


2008-10-17 Cedric Vivier <cedricv@neonux.com>

* backend/SingleSteppingEngine.cs
Enable StepInto for RemotingInvoke-wrapped methods.
* classes/Method.cs
(Method.IsInvokeWrapper): New public property.

2008-10-13 Martin Baulig <martin@ximian.com> 2008-10-13 Martin Baulig <martin@ximian.com>


* classes/StackFrame.cs * classes/StackFrame.cs
Expand Down
14 changes: 7 additions & 7 deletions backend/SingleSteppingEngine.cs
Expand Up @@ -2823,7 +2823,7 @@ protected override bool TrampolineHandler (Method method)
if (method == null) if (method == null)
return false; return false;


if (method.WrapperType == WrapperType.DelegateInvoke) if (method.IsInvokeWrapper)
return true; return true;
else if (method.WrapperType == WrapperType.Alloc) else if (method.WrapperType == WrapperType.Alloc)
return false; return false;
Expand Down Expand Up @@ -2932,11 +2932,11 @@ protected bool Step (bool first)
Method method = sse.Lookup (call_target); Method method = sse.Lookup (call_target);


/* /*
* If this is a PInvoke/icall wrapper, check whether we want to step into * If this is a PInvoke/icall/remoting wrapper, check whether we want
* the wrapped function. * to step into the wrapped function.
*/ */
if ((method != null) && (method.WrapperType != WrapperType.None)) { if ((method != null) && (method.WrapperType != WrapperType.None)) {
if (method.WrapperType == WrapperType.DelegateInvoke) { if (method.IsInvokeWrapper) {
sse.do_step_native (); sse.do_step_native ();
return false; return false;
} }
Expand Down Expand Up @@ -3986,7 +3986,7 @@ protected override bool TrampolineHandler (Method method)
if (method == null) if (method == null)
return false; return false;


if (method.WrapperType == WrapperType.DelegateInvoke) if (method.IsInvokeWrapper)
return true; return true;


return sse.MethodHasSource (method); return sse.MethodHasSource (method);
Expand Down Expand Up @@ -4091,7 +4091,7 @@ protected override bool TrampolineHandler (Method method)
if (method == null) if (method == null)
return false; return false;


if (method.WrapperType == WrapperType.DelegateInvoke) if (method.IsInvokeWrapper)
return true; return true;


return sse.MethodHasSource (method); return sse.MethodHasSource (method);
Expand Down Expand Up @@ -4139,7 +4139,7 @@ protected override bool TrampolineHandler (Method method)
if (method == null) if (method == null)
return false; return false;


if (method.WrapperType == WrapperType.DelegateInvoke) if (method.IsInvokeWrapper)
return true; return true;


return sse.MethodHasSource (method); return sse.MethodHasSource (method);
Expand Down
8 changes: 8 additions & 0 deletions classes/Method.cs
Expand Up @@ -188,6 +188,14 @@ internal StackFrame UnwindStack (StackFrame frame, TargetMemoryAccess memory)
get; get;
} }


internal bool IsInvokeWrapper {
get {
return (WrapperType == WrapperType.DelegateInvoke ||
WrapperType == WrapperType.RemotingInvoke ||
WrapperType == WrapperType.RemotingInvokeWithCheck);
}
}

public abstract bool IsCompilerGenerated { public abstract bool IsCompilerGenerated {
get; get;
} }
Expand Down
15 changes: 15 additions & 0 deletions test/src/TestSSE.cs
Expand Up @@ -6,6 +6,7 @@ static void Main ()
{ {
WhileLoop.Run (); // @MDB LINE: main WhileLoop.Run (); // @MDB LINE: main
Foreach.Run (); Foreach.Run ();
MarshalByRefTest.Run ();
} }
} }


Expand Down Expand Up @@ -49,3 +50,17 @@ public static int Run ()
return total; // @MDB BREAKPOINT: foreach return return total; // @MDB BREAKPOINT: foreach return
} }
} }

public class MarshalByRefTest : MarshalByRefObject
{
public void Bar ()
{
Console.WriteLine ("MarshalByRefTest"); // @MDB LINE: MarshalByRef Test
}

public static void Run ()
{
MarshalByRefTest test = new MarshalByRefTest ();
test.Bar (); // @MDB BREAKPOINT: MarshalByRef Run
}
}
14 changes: 13 additions & 1 deletion test/testsuite/TestSSE.cs
Expand Up @@ -81,11 +81,23 @@ public void Main ()
AssertExecute ("continue"); AssertExecute ("continue");
AssertHitBreakpoint (thread, "foreach return", "Foreach.Run()"); AssertHitBreakpoint (thread, "foreach return", "Foreach.Run()");


AssertExecute ("continue");

// //
// Done // MarshalByRef
// //


AssertHitBreakpoint (thread, "MarshalByRef Run", "MarshalByRefTest.Run()");
AssertExecute ("step");
AssertStopped (thread, "MarshalByRef Test", "MarshalByRefTest.Bar()");
AssertExecute ("continue"); AssertExecute ("continue");

AssertTargetOutput ("MarshalByRefTest");

//
// Done
//

AssertTargetExited (thread.Process); AssertTargetExited (thread.Process);
} }
} }
Expand Down

0 comments on commit b693599

Please sign in to comment.