2003-08-07 Michal Ludvig <mludvig@suse.cz>
authorMichal Ludvig <mludvig@suse.cz>
Thu, 7 Aug 2003 11:26:42 +0000 (11:26 +0000)
committerMichal Ludvig <mludvig@suse.cz>
Thu, 7 Aug 2003 11:26:42 +0000 (11:26 +0000)
* x86-64-tdep.c (x86_64_push_arguments): Skip the red zone.

gdb/ChangeLog
gdb/x86-64-tdep.c

index 71d5b5c4561124f877515e0461ea1be10b80e15b..146ae070de154896b6e5fdccacc59480d1610fc9 100644 (file)
@@ -1,5 +1,7 @@
 2003-08-07  Michal Ludvig  <mludvig@suse.cz>
+
        * x86-64-tdep.c (x86_64_dwarf_regmap): Correct register numbers.
+       (x86_64_push_arguments): Skip the red zone.
 
 2003-08-05  Andrew Cagney  <cagney@redhat.com>
 
index 2e682dc808aef97d03faa04ab2ab76efe1fbfb51..29dca25c0dbec4e99d7ba15859330a4f402b1193 100644 (file)
@@ -613,6 +613,14 @@ x86_64_push_arguments (struct regcache *regcache, int nargs,
   int stack_values_count = 0;
   int *stack_values;
   stack_values = alloca (nargs * sizeof (int));
+
+  /* Before storing anything to the stack we must skip
+     the "Red zone" (see the "Function calling sequence" section
+     of AMD64 ABI).
+     It could have already been skipped in the function's
+     prologue, but we don't care and will easily skip it once again.  */
+  sp -= 128;
+
   for (i = 0; i < nargs; i++)
     {
       enum x86_64_reg_class class[MAX_CLASSES];