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

Commit

Permalink
2004-06-03 Martin Baulig <martin@ximian.com>
Browse files Browse the repository at this point in the history
	* backends/mono-csharp/MonoFunctionType.cs
	(MonoFunctionType.Invoke): Copy register variables onto the heap.

svn path=/trunk/debugger/; revision=28758
  • Loading branch information
Martin Baulig committed Jun 3, 2004
1 parent 8cbd840 commit 3e2228e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2004-06-03 Martin Baulig <martin@ximian.com>

* backends/mono-csharp/MonoFunctionType.cs
(MonoFunctionType.Invoke): Copy register variables onto the heap.

2004-06-03 Martin Baulig <martin@ximian.com>

* test/TestInvocation.cs: New file.
Expand Down
15 changes: 13 additions & 2 deletions backends/mono-csharp/MonoFunctionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,19 @@ protected ITargetObject Invoke (StackFrame frame, TargetAddress this_object,
parameter_types.Length, args.Length);

TargetAddress[] arg_ptr = new TargetAddress [args.Length];
for (int i = 0; i < args.Length; i++)
arg_ptr [i] = args [i].Location.Address;
for (int i = 0; i < args.Length; i++) {
if (args [i].Location.HasAddress) {
arg_ptr [i] = args [i].Location.Address;
continue;
}

Heap heap = file.Table.Language.DataHeap;
byte[] contents = args [i].RawContents;
TargetLocation new_loc = heap.Allocate (frame, contents.Length);
frame.TargetAccess.WriteBuffer (new_loc.Address, contents);

arg_ptr [i] = new_loc.Address;
}

if (debug) {
frame.RuntimeInvoke (method, this_object, arg_ptr);
Expand Down

0 comments on commit 3e2228e

Please sign in to comment.