aboutsummaryrefslogtreecommitdiff
path: root/gdb/x86-64-tdep.c
diff options
context:
space:
mode:
authorMichal Ludvig <mludvig@suse.cz>2003-08-07 11:26:42 +0000
committerMichal Ludvig <mludvig@suse.cz>2003-08-07 11:26:42 +0000
commitfd83badabb576ef0d2153334e0f1ab99500b6548 (patch)
tree6b9cb4f1571cc581ae3c24f5acb1949b999efd8f /gdb/x86-64-tdep.c
parent9c5bfbb7fd76589a332126f99a4e195e46da207f (diff)
downloadfsf-binutils-gdb-fd83badabb576ef0d2153334e0f1ab99500b6548.zip
fsf-binutils-gdb-fd83badabb576ef0d2153334e0f1ab99500b6548.tar.gz
fsf-binutils-gdb-fd83badabb576ef0d2153334e0f1ab99500b6548.tar.bz2
2003-08-07 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_push_arguments): Skip the red zone.
Diffstat (limited to 'gdb/x86-64-tdep.c')
-rw-r--r--gdb/x86-64-tdep.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 2e682dc..29dca25 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];