Author: martin
Date: 2006-05-30 10:44:49 -0400 (Tue, 30 May 2006)
New Revision: 61261

Modified:
   trunk/debugger/ChangeLog
   trunk/debugger/backends/server/x86_64-arch.c
   trunk/debugger/languages/mono/MonoSymbolFile.cs
   trunk/debugger/test/testsuite/TestException.cs
Log:
2006-05-30  Martin Baulig  <[EMAIL PROTECTED]>

        * backends/server/x86_64-arch.c
        (server_ptrace_push_registers): Don't corrup the red zone.
        (server_ptrace_call_method_*): Likewise.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2006-05-30 14:13:20 UTC (rev 61260)
+++ trunk/debugger/ChangeLog    2006-05-30 14:44:49 UTC (rev 61261)
@@ -1,3 +1,9 @@
+2006-05-30  Martin Baulig  <[EMAIL PROTECTED]>
+
+       * backends/server/x86_64-arch.c
+       (server_ptrace_push_registers): Don't corrup the red zone.
+       (server_ptrace_call_method_*): Likewise.
+
 2006-05-24  Martin Baulig  <[EMAIL PROTECTED]>
 
        * doc/GC-issues.txt: Added document describing the interface

Modified: trunk/debugger/backends/server/x86_64-arch.c
===================================================================
--- trunk/debugger/backends/server/x86_64-arch.c        2006-05-30 14:13:20 UTC 
(rev 61260)
+++ trunk/debugger/backends/server/x86_64-arch.c        2006-05-30 14:44:49 UTC 
(rev 61261)
@@ -13,6 +13,8 @@
 #include "x86-linux-ptrace.h"
 #include "x86-arch.h"
 
+#define AMD64_RED_ZONE_SIZE 128
+
 struct ArchInfo
 {
        long call_address;
@@ -358,7 +360,7 @@
        ArchInfo *arch = handle->arch;
        ServerCommandError result;
 
-       INFERIOR_REG_RSP (arch->current_regs) -= sizeof (arch->current_regs);
+       INFERIOR_REG_RSP (arch->current_regs) -= AMD64_RED_ZONE_SIZE + sizeof 
(arch->current_regs);
        result = _server_ptrace_set_registers (handle->inferior, 
&arch->current_regs);
        if (result != COMMAND_ERROR_NONE)
                return result;
@@ -379,7 +381,7 @@
        ArchInfo *arch = handle->arch;
        ServerCommandError result;
 
-       INFERIOR_REG_RSP (arch->current_regs) += sizeof (arch->current_regs);
+       INFERIOR_REG_RSP (arch->current_regs) += AMD64_RED_ZONE_SIZE + sizeof 
(arch->current_regs);
        result = _server_ptrace_set_registers (handle->inferior, 
&arch->current_regs);
        if (result != COMMAND_ERROR_NONE)
                return result;
@@ -718,7 +720,7 @@
        if (arch->saved_regs)
                return COMMAND_ERROR_RECURSIVE_CALL;
 
-       new_rsp = INFERIOR_REG_RSP (arch->current_regs) - size;
+       new_rsp = INFERIOR_REG_RSP (arch->current_regs) - AMD64_RED_ZONE_SIZE - 
size;
 
        *((guint64 *) code) = new_rsp + 16;
        *((guint64 *) (code+8)) = callback_argument;
@@ -772,7 +774,7 @@
        if (arch->saved_regs)
                return COMMAND_ERROR_RECURSIVE_CALL;
 
-       new_rsp = INFERIOR_REG_RSP (arch->current_regs) - size;
+       new_rsp = INFERIOR_REG_RSP (arch->current_regs) - AMD64_RED_ZONE_SIZE - 
size;
 
        *((guint64 *) code) = new_rsp + 16;
        *((guint64 *) (code+8)) = callback_argument;
@@ -815,7 +817,7 @@
        if (arch->saved_regs)
                return COMMAND_ERROR_RECURSIVE_CALL;
 
-       new_rsp = INFERIOR_REG_RSP (arch->current_regs) - size;
+       new_rsp = INFERIOR_REG_RSP (arch->current_regs) - AMD64_RED_ZONE_SIZE - 
size;
 
        *((guint64 *) code) = new_rsp + size - 1;
        *((guint64 *) (code+8)) = INFERIOR_REG_RAX (arch->current_regs);
@@ -889,7 +891,7 @@
        if (arch->saved_regs)
                return COMMAND_ERROR_RECURSIVE_CALL;
 
-       new_rsp = INFERIOR_REG_RSP (arch->current_regs) - size;
+       new_rsp = INFERIOR_REG_RSP (arch->current_regs) - AMD64_RED_ZONE_SIZE - 
size;
        blob_start = new_rsp + static_size;
 
        for (i = 0; i < num_params; i++) {

Modified: trunk/debugger/languages/mono/MonoSymbolFile.cs
===================================================================
--- trunk/debugger/languages/mono/MonoSymbolFile.cs     2006-05-30 14:13:20 UTC 
(rev 61260)
+++ trunk/debugger/languages/mono/MonoSymbolFile.cs     2006-05-30 14:44:49 UTC 
(rev 61261)
@@ -1038,8 +1038,8 @@
                                for (int i = 0; i < line_numbers.Length; i++) {
                                        JitLineNumberEntry lne = line_numbers 
[i];
 
-                                       Console.WriteLine ("{0,4} {1,4:x} 
{2,4:x}", i, lne.Offset,
-                                                          imethod.StartAddress 
+ lne.Address);
+                                       Console.WriteLine ("{0,4} {1,4:x} 
{2,4:x} {3,4:x}", i, lne.Offset,
+                                                          lne.Address, 
imethod.StartAddress + lne.Address);
                                }
                                Console.WriteLine ("-----------------");
                        }

Modified: trunk/debugger/test/testsuite/TestException.cs
===================================================================
--- trunk/debugger/test/testsuite/TestException.cs      2006-05-30 14:13:20 UTC 
(rev 61260)
+++ trunk/debugger/test/testsuite/TestException.cs      2006-05-30 14:44:49 UTC 
(rev 61261)
@@ -53,7 +53,8 @@
                                              "Invocation of `x.Test ()' raised 
an exception: " +
                                              
"System.InvalidOperationException: Operation is not " +
                                              "valid due to the current state 
of the object\n" +
-                                             "in [0x00005] (at " + FileName + 
":8) X:Test ()");
+                                             "  at X.Test () [0x00000] in " + 
FileName + ":" +
+                                             LineException + " ");
 
                        AssertExecute ("continue");
                        AssertTargetOutput ("Done");

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

Reply via email to