This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Fix in passing arguments on AMD64
- From: Michal Ludvig <mludvig at suse dot cz>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 05 Jun 2003 20:58:52 +0200
- Subject: [PATCH] Fix in passing arguments on AMD64
Hi,
this simple patch fixes passing of structures to functions called from
the gdb prompt on AMD64. Tested on a testsuite and committed as obvious.
Michal Ludvig
2003-06-05 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_push_arguments): Don't clear offset
in each pass.
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.75
diff -u -p -r1.75 x86-64-tdep.c
--- x86-64-tdep.c 31 May 2003 16:54:18 -0000 1.75
+++ x86-64-tdep.c 5 Jun 2003 16:18:56 -0000
@@ -623,9 +623,9 @@ x86_64_push_arguments (struct regcache *
else
{
int j;
+ int offset = 0;
for (j = 0; j < n; j++)
{
- int offset = 0;
switch (class[j])
{
case X86_64_NO_CLASS: