From: Michal Ludvig Date: Thu, 7 Aug 2003 11:26:42 +0000 (+0000) Subject: 2003-08-07 Michal Ludvig X-Git-Tag: ezannoni_pie-20030916-branchpoint~472 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd83badabb576ef0d2153334e0f1ab99500b6548;p=thirdparty%2Fbinutils-gdb.git 2003-08-07 Michal Ludvig * x86-64-tdep.c (x86_64_push_arguments): Skip the red zone. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 71d5b5c4561..146ae070de1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2003-08-07 Michal Ludvig + * x86-64-tdep.c (x86_64_dwarf_regmap): Correct register numbers. + (x86_64_push_arguments): Skip the red zone. 2003-08-05 Andrew Cagney diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c index 2e682dc808a..29dca25c0db 100644 --- a/gdb/x86-64-tdep.c +++ b/gdb/x86-64-tdep.c @@ -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];