Skip to content
Browse files

Make this work when the stack is executable.

2010-02-24  Martin Baulig  <martin@ximian.com>

	* backend/server/x86_64-arch.c
	(server_ptrace_call_method_invoke): Set correct return address to
	make this work even if the stack is executable.

svn path=/trunk/debugger/; revision=152397
  • Loading branch information...
1 parent e5f5ad1 commit 702b7a2aff135c0c73e4687d5cc7d5b70c0d9688 Martin Baulig committed
Showing with 8 additions and 2 deletions.
  1. +6 −0 ChangeLog
  2. +2 −2 backend/server/x86_64-arch.c
View
6 ChangeLog
@@ -1,3 +1,9 @@
+2010-02-24 Martin Baulig <martin@ximian.com>
+
+ * backend/server/x86_64-arch.c
+ (server_ptrace_call_method_invoke): Set correct return address to
+ make this work even if the stack is executable.
+
2010-02-23 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
View
4 backend/server/x86_64-arch.c
@@ -1191,13 +1191,13 @@ server_ptrace_call_method_invoke (ServerHandle *handle, guint64 invoke_method,
ptr [i] = param_data [i];
}
- *((guint64 *) code) = new_rsp + static_size - 1;
+ *((guint64 *) code) = new_rsp + 24;
*((guint64 *) (code+8)) = callback_argument;
cdata = g_new0 (CallbackData, 1);
memcpy (&cdata->saved_regs, &arch->current_regs, sizeof (arch->current_regs));
memcpy (&cdata->saved_fpregs, &arch->current_fpregs, sizeof (arch->current_fpregs));
- cdata->call_address = new_rsp + static_size - 1;
+ cdata->call_address = new_rsp + 24;
cdata->stack_pointer = new_rsp + 8;
cdata->exc_address = new_rsp + 16;
cdata->callback_argument = callback_argument;

0 comments on commit 702b7a2

Please sign in to comment.
Something went wrong with that request. Please try again.