This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]