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]

[commit] Fix second 'read, write' parameter reversal


Hello,

This is the exact same problem as with xfer_partial - the read/write parameters were backwards. This fixes them (they were actually called inval and outval).

Committed,
Andrew
2003-11-10  Andrew Cagney  <cagney@redhat.com>

	* gdbarch.sh (return_value): Replace "inval" and "outval" with
	"readbuf" and "writebuf".
	* ppcnbsd-tdep.c (ppcnbsd_return_value): Ditto.
	* d10v-tdep.c (d10v_return_value): Ditto.
	* ppc-tdep.h (ppc_sysv_abi_return_value): Ditto.
	(ppc_sysv_abi_broken_return_value): Ditto.
	(ppc64_sysv_abi_return_value): Ditto.
	* ppc-sysv-tdep.c (do_ppc_sysv_return_value): Ditto.
	(ppc_sysv_abi_return_value): Ditto.
	(ppc_sysv_abi_broken_return_value): Ditto.
	(ppc64_sysv_abi_return_value): Ditto.
	* values.c (register_value_being_returned): Update call.
	* stack.c (return_command): Update call.
	* gdbarch.h, gdbarch.c: Re-generate.

Index: gdb/doc/ChangeLog
2003-11-10  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Replace the
	return_value method's "inval" and "outval" parameters with
	"readbuf" and "writebuf".

Index: gdb/d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.137
diff -u -r1.137 d10v-tdep.c
--- gdb/d10v-tdep.c	9 Nov 2003 14:20:55 -0000	1.137
+++ gdb/d10v-tdep.c	10 Nov 2003 22:44:33 -0000
@@ -378,8 +378,8 @@
 
 static enum return_value_convention
 d10v_return_value (struct gdbarch *gdbarch, struct type *valtype,
-		   struct regcache *regcache, const void *writebuf,
-		   void *readbuf)
+		   struct regcache *regcache, void *readbuf,
+		   const void *writebuf)
 {
   if (TYPE_LENGTH (valtype) > 8)
     /* Anything larger than 8 bytes (4 registers) goes on the stack.  */
Index: gdb/gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.260
diff -u -r1.260 gdbarch.c
--- gdb/gdbarch.c	10 Nov 2003 04:39:17 -0000	1.260
+++ gdb/gdbarch.c	10 Nov 2003 22:44:34 -0000
@@ -4289,13 +4289,13 @@
 }
 
 enum return_value_convention
-gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, const void *inval, void *outval)
+gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->return_value != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
-  return gdbarch->return_value (gdbarch, valtype, regcache, inval, outval);
+  return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
 }
 
 void
Index: gdb/gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.226
diff -u -r1.226 gdbarch.h
--- gdb/gdbarch.h	10 Nov 2003 04:39:17 -0000	1.226
+++ gdb/gdbarch.h	10 Nov 2003 22:44:34 -0000
@@ -1451,8 +1451,8 @@
 
 extern int gdbarch_return_value_p (struct gdbarch *gdbarch);
 
-typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, const void *inval, void *outval);
-extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, const void *inval, void *outval);
+typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf);
+extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf);
 extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value);
 
 /* The deprecated methods RETURN_VALUE_ON_STACK, EXTRACT_RETURN_VALUE,
Index: gdb/gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.285
diff -u -r1.285 gdbarch.sh
--- gdb/gdbarch.sh	10 Nov 2003 04:39:17 -0000	1.285
+++ gdb/gdbarch.sh	10 Nov 2003 22:44:35 -0000
@@ -602,7 +602,7 @@
 # should take the type/value of the function to be called and not the
 # return type.  This is left as an exercise for the reader.
 
-M:::enum return_value_convention:return_value:struct type *valtype, struct regcache *regcache, const void *inval, void *outval:valtype, regcache, inval, outval
+M:::enum return_value_convention:return_value:struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf:valtype, regcache, readbuf, writebuf
 
 # The deprecated methods RETURN_VALUE_ON_STACK, EXTRACT_RETURN_VALUE,
 # STORE_RETURN_VALUE and USE_STRUCT_CONVENTION have all been folded
Index: gdb/ppc-sysv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-sysv-tdep.c,v
retrieving revision 1.19
diff -u -r1.19 ppc-sysv-tdep.c
--- gdb/ppc-sysv-tdep.c	7 Nov 2003 20:44:51 -0000	1.19
+++ gdb/ppc-sysv-tdep.c	10 Nov 2003 22:44:35 -0000
@@ -323,8 +323,8 @@
 
 static enum return_value_convention
 do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *type,
-			  struct regcache *regcache, const void *inval,
-			  void *outval, int broken_gcc)
+			  struct regcache *regcache, void *readbuf,
+			  const void *writebuf, int broken_gcc)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   gdb_assert (tdep->wordsize == 4);
@@ -332,22 +332,22 @@
       && TYPE_LENGTH (type) <= 8
       && ppc_floating_point_unit_p (gdbarch))
     {
-      if (outval)
+      if (readbuf)
 	{
 	  /* Floats and doubles stored in "f1".  Convert the value to
 	     the required type.  */
 	  char regval[MAX_REGISTER_SIZE];
 	  struct type *regtype = register_type (gdbarch, FP0_REGNUM + 1);
 	  regcache_cooked_read (regcache, FP0_REGNUM + 1, regval);
-	  convert_typed_floating (regval, regtype, outval, type);
+	  convert_typed_floating (regval, regtype, readbuf, type);
 	}
-      if (inval)
+      if (writebuf)
 	{
 	  /* Floats and doubles stored in "f1".  Convert the value to
 	     the register's "double" type.  */
 	  char regval[MAX_REGISTER_SIZE];
 	  struct type *regtype = register_type (gdbarch, FP0_REGNUM);
-	  convert_typed_floating (inval, type, regval, regtype);
+	  convert_typed_floating (writebuf, type, regval, regtype);
 	  regcache_cooked_write (regcache, FP0_REGNUM + 1, regval);
 	}
       return RETURN_VALUE_REGISTER_CONVENTION;
@@ -355,28 +355,28 @@
   if ((TYPE_CODE (type) == TYPE_CODE_INT && TYPE_LENGTH (type) == 8)
       || (TYPE_CODE (type) == TYPE_CODE_FLT && TYPE_LENGTH (type) == 8))
     {
-      if (outval)
+      if (readbuf)
 	{
 	  /* A long long, or a double stored in the 32 bit r3/r4.  */
 	  regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3,
-				(bfd_byte *) outval + 0);
+				(bfd_byte *) readbuf + 0);
 	  regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
-				(bfd_byte *) outval + 4);
+				(bfd_byte *) readbuf + 4);
 	}
-      if (inval)
+      if (writebuf)
 	{
 	  /* A long long, or a double stored in the 32 bit r3/r4.  */
 	  regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3,
-				 (bfd_byte *) inval + 0);
+				 (const bfd_byte *) writebuf + 0);
 	  regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 4,
-				 (bfd_byte *) inval + 4);
+				 (const bfd_byte *) writebuf + 4);
 	}
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
   if (TYPE_CODE (type) == TYPE_CODE_INT
       && TYPE_LENGTH (type) <= tdep->wordsize)
     {
-      if (outval)
+      if (readbuf)
 	{
 	  /* Some sort of integer stored in r3.  Since TYPE isn't
 	     bigger than the register, sign extension isn't a problem
@@ -384,14 +384,14 @@
 	  ULONGEST regval;
 	  regcache_cooked_read_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
 					 &regval);
-	  store_unsigned_integer (outval, TYPE_LENGTH (type), regval);
+	  store_unsigned_integer (readbuf, TYPE_LENGTH (type), regval);
 	}
-      if (inval)
+      if (writebuf)
 	{
 	  /* Some sort of integer stored in r3.  Use unpack_long since
 	     that should handle any required sign extension.  */
 	  regcache_cooked_write_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
-					  unpack_long (type, inval));
+					  unpack_long (type, writebuf));
 	}
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
@@ -399,15 +399,15 @@
       && TYPE_CODE (type) == TYPE_CODE_ARRAY
       && TYPE_VECTOR (type) && tdep->ppc_vr0_regnum >= 0)
     {
-      if (outval)
+      if (readbuf)
 	{
 	  /* Altivec places the return value in "v2".  */
-	  regcache_cooked_read (regcache, tdep->ppc_vr0_regnum + 2, outval);
+	  regcache_cooked_read (regcache, tdep->ppc_vr0_regnum + 2, readbuf);
 	}
-      if (inval)
+      if (writebuf)
 	{
 	  /* Altivec places the return value in "v2".  */
-	  regcache_cooked_write (regcache, tdep->ppc_vr0_regnum + 2, inval);
+	  regcache_cooked_write (regcache, tdep->ppc_vr0_regnum + 2, writebuf);
 	}
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
@@ -420,15 +420,15 @@
 	 corresponds to the entire r3 value for e500, whereas GDB's r3
 	 only corresponds to the least significant 32-bits.  So place
 	 the 64-bit DSP type's value in ev3.  */
-      if (outval)
-	regcache_cooked_read (regcache, tdep->ppc_ev0_regnum + 3, outval);
-      if (inval)
-	regcache_cooked_write (regcache, tdep->ppc_ev0_regnum + 3, inval);
+      if (readbuf)
+	regcache_cooked_read (regcache, tdep->ppc_ev0_regnum + 3, readbuf);
+      if (writebuf)
+	regcache_cooked_write (regcache, tdep->ppc_ev0_regnum + 3, writebuf);
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
   if (broken_gcc && TYPE_LENGTH (type) <= 8)
     {
-      if (outval)
+      if (readbuf)
 	{
 	  /* GCC screwed up.  The last register isn't "left" aligned.
 	     Need to extract the least significant part of each
@@ -446,12 +446,12 @@
 	      regcache_cooked_read_unsigned (regcache,
 					     tdep->ppc_gp0_regnum + 3 + word,
 					     &reg);
-	      store_unsigned_integer (((bfd_byte *) outval
+	      store_unsigned_integer (((bfd_byte *) readbuf
 				       + word * tdep->wordsize), len, reg);
 	      word++;
 	    }
 	}
-      if (inval)
+      if (writebuf)
 	{
 	  /* GCC screwed up.  The last register isn't "left" aligned.
 	     Need to extract the least significant part of each
@@ -466,7 +466,7 @@
 		break;
 	      if (len > tdep->wordsize)
 		len = tdep->wordsize;
-	      reg = extract_unsigned_integer (((bfd_byte *) inval
+	      reg = extract_unsigned_integer (((const bfd_byte *) writebuf
 					       + word * tdep->wordsize), len);
 	      regcache_cooked_write_unsigned (regcache,
 					      tdep->ppc_gp0_regnum + 3 + word,
@@ -478,7 +478,7 @@
     }
   if (TYPE_LENGTH (type) <= 8)
     {
-      if (outval)
+      if (readbuf)
 	{
 	  /* This matches SVr4 PPC, it does not match GCC.  */
 	  /* The value is right-padded to 8 bytes and then loaded, as
@@ -489,16 +489,16 @@
 	  if (TYPE_LENGTH (type) > tdep->wordsize)
 	    regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
 				  regvals + 1 * tdep->wordsize);
-	  memcpy (outval, regvals, TYPE_LENGTH (type));
+	  memcpy (readbuf, regvals, TYPE_LENGTH (type));
 	}
-      if (inval)
+      if (writebuf)
 	{
 	  /* This matches SVr4 PPC, it does not match GCC.  */
 	  /* The value is padded out to 8 bytes and then loaded, as
 	     two "words" into r3/r4.  */
 	  char regvals[MAX_REGISTER_SIZE * 2];
 	  memset (regvals, 0, sizeof regvals);
-	  memcpy (regvals, inval, TYPE_LENGTH (type));
+	  memcpy (regvals, writebuf, TYPE_LENGTH (type));
 	  regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3,
 				 regvals + 0 * tdep->wordsize);
 	  if (TYPE_LENGTH (type) > tdep->wordsize)
@@ -512,17 +512,21 @@
 
 enum return_value_convention
 ppc_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
-			   struct regcache *regcache, const void *inval, void *outval)
+			   struct regcache *regcache, void *readbuf,
+			   const void *writebuf)
 {
-  return do_ppc_sysv_return_value (gdbarch, valtype, regcache, inval, outval, 0);
+  return do_ppc_sysv_return_value (gdbarch, valtype, regcache, readbuf,
+				   writebuf, 0);
 }
 
 enum return_value_convention
-ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch, struct type *valtype,
-				  struct regcache *regcache, const void *inval,
-				  void *outval)
+ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
+				  struct type *valtype,
+				  struct regcache *regcache,
+				  void *readbuf, const void *writebuf)
 {
-  return do_ppc_sysv_return_value (gdbarch, valtype, regcache, inval, outval, 1);
+  return do_ppc_sysv_return_value (gdbarch, valtype, regcache, readbuf,
+				   writebuf, 1);
 }
 
 /* Pass the arguments in either registers, or in the stack. Using the
@@ -821,14 +825,14 @@
    0 if the return-value is instead stored on the stack (a.k.a.,
    struct return convention).
 
-   For a return-value stored in a register: when INVAL is non-NULL,
+   For a return-value stored in a register: when WRITEBUF is non-NULL,
    copy the buffer to the corresponding register return-value location
-   location; when OUTVAL is non-NULL, fill the buffer from the
+   location; when READBUF is non-NULL, fill the buffer from the
    corresponding register return-value location.  */
 enum return_value_convention
 ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
-			     struct regcache *regcache, const void *inval,
-			     void *outval)
+			     struct regcache *regcache, void *readbuf,
+			     const void *writebuf)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   /* Floats and doubles in F1.  */
@@ -836,35 +840,35 @@
     {
       char regval[MAX_REGISTER_SIZE];
       struct type *regtype = register_type (gdbarch, FP0_REGNUM);
-      if (inval != NULL)
+      if (writebuf != NULL)
 	{
-	  convert_typed_floating (inval, valtype, regval, regtype);
+	  convert_typed_floating (writebuf, valtype, regval, regtype);
 	  regcache_cooked_write (regcache, FP0_REGNUM + 1, regval);
 	}
-      if (outval != NULL)
+      if (readbuf != NULL)
 	{
 	  regcache_cooked_read (regcache, FP0_REGNUM + 1, regval);
-	  convert_typed_floating (regval, regtype, outval, valtype);
+	  convert_typed_floating (regval, regtype, readbuf, valtype);
 	}
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
   if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 8)
     {
       /* Integers in r3.  */
-      if (inval != NULL)
+      if (writebuf != NULL)
 	{
 	  /* Be careful to sign extend the value.  */
 	  regcache_cooked_write_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
-					  unpack_long (valtype, inval));
+					  unpack_long (valtype, writebuf));
 	}
-      if (outval != NULL)
+      if (readbuf != NULL)
 	{
 	  /* Extract the integer from r3.  Since this is truncating the
 	     value, there isn't a sign extension problem.  */
 	  ULONGEST regval;
 	  regcache_cooked_read_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
 					 &regval);
-	  store_unsigned_integer (outval, TYPE_LENGTH (valtype), regval);
+	  store_unsigned_integer (readbuf, TYPE_LENGTH (valtype), regval);
 	}
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
@@ -872,10 +876,10 @@
   if (TYPE_CODE (valtype) == TYPE_CODE_PTR)
     {
       /* All pointers live in r3.  */
-      if (inval != NULL)
-	regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3, inval);
-      if (outval != NULL)
-	regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3, outval);
+      if (writebuf != NULL)
+	regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3, writebuf);
+      if (readbuf != NULL)
+	regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3, readbuf);
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
   if (TYPE_CODE (valtype) == TYPE_CODE_ARRAY
@@ -886,12 +890,12 @@
       /* Small character arrays are returned, right justified, in r3.  */
       int offset = (register_size (gdbarch, tdep->ppc_gp0_regnum + 3)
 		    - TYPE_LENGTH (valtype));
-      if (inval != NULL)
+      if (writebuf != NULL)
 	regcache_cooked_write_part (regcache, tdep->ppc_gp0_regnum + 3,
-				    offset, TYPE_LENGTH (valtype), inval);
-      if (outval != NULL)
+				    offset, TYPE_LENGTH (valtype), writebuf);
+      if (readbuf != NULL)
 	regcache_cooked_read_part (regcache, tdep->ppc_gp0_regnum + 3,
-				   offset, TYPE_LENGTH (valtype), outval);
+				   offset, TYPE_LENGTH (valtype), readbuf);
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
   /* Big floating point values get stored in adjacent floating
@@ -899,17 +903,17 @@
   if (TYPE_CODE (valtype) == TYPE_CODE_FLT
       && (TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 32))
     {
-      if (inval || outval != NULL)
+      if (writebuf || readbuf != NULL)
 	{
 	  int i;
 	  for (i = 0; i < TYPE_LENGTH (valtype) / 8; i++)
 	    {
-	      if (inval != NULL)
+	      if (writebuf != NULL)
 		regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
-				       (const bfd_byte *) inval + i * 8);
-	      if (outval != NULL)
+				       (const bfd_byte *) writebuf + i * 8);
+	      if (readbuf != NULL)
 		regcache_cooked_read (regcache, FP0_REGNUM + 1 + i,
-				      (bfd_byte *) outval + i * 8);
+				      (bfd_byte *) readbuf + i * 8);
 	    }
 	}
       return RETURN_VALUE_REGISTER_CONVENTION;
@@ -926,19 +930,19 @@
 	      char regval[MAX_REGISTER_SIZE];
 	      struct type *regtype =
 		register_type (current_gdbarch, FP0_REGNUM);
-	      if (inval != NULL)
+	      if (writebuf != NULL)
 		{
-		  convert_typed_floating ((const bfd_byte *) inval +
+		  convert_typed_floating ((const bfd_byte *) writebuf +
 					  i * (TYPE_LENGTH (valtype) / 2),
 					  valtype, regval, regtype);
 		  regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
 					 regval);
 		}
-	      if (outval != NULL)
+	      if (readbuf != NULL)
 		{
 		  regcache_cooked_read (regcache, FP0_REGNUM + 1 + i, regval);
 		  convert_typed_floating (regval, regtype,
-					  (bfd_byte *) outval +
+					  (bfd_byte *) readbuf +
 					  i * (TYPE_LENGTH (valtype) / 2),
 					  valtype);
 		}
@@ -954,12 +958,12 @@
 	  int i;
 	  for (i = 0; i < 4; i++)
 	    {
-	      if (inval != NULL)
+	      if (writebuf != NULL)
 		regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
-				       (const bfd_byte *) inval + i * 8);
-	      if (outval != NULL)
+				       (const bfd_byte *) writebuf + i * 8);
+	      if (readbuf != NULL)
 		regcache_cooked_read (regcache, FP0_REGNUM + 1 + i,
-				      (bfd_byte *) outval + i * 8);
+				      (bfd_byte *) readbuf + i * 8);
 	    }
 	}
       return RETURN_VALUE_REGISTER_CONVENTION;
Index: gdb/ppc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/ppc-tdep.h,v
retrieving revision 1.24
diff -u -r1.24 ppc-tdep.h
--- gdb/ppc-tdep.h	7 Nov 2003 20:44:51 -0000	1.24
+++ gdb/ppc-tdep.h	10 Nov 2003 22:44:35 -0000
@@ -37,13 +37,13 @@
 enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch,
 							struct type *valtype,
 							struct regcache *regcache,
-							const void *inval,
-							void *outval);
+							void *readbuf,
+							const void *writebuf);
 enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
 							       struct type *valtype,
 							       struct regcache *regcache,
-							       const void *inval,
-							       void *outval);
+							       void *readbuf,
+							       const void *writebuf);
 CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
 					CORE_ADDR func_addr,
 					struct regcache *regcache,
@@ -68,8 +68,8 @@
 enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch,
 							  struct type *valtype,
 							  struct regcache *regcache,
-							  const void *inval,
-							  void *outval);
+							  void *readbuf,
+							  const void *writebuf);
 
 /* From rs6000-tdep.c... */
 CORE_ADDR rs6000_frame_saved_pc (struct frame_info *fi);
Index: gdb/ppcnbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppcnbsd-tdep.c,v
retrieving revision 1.10
diff -u -r1.10 ppcnbsd-tdep.c
--- gdb/ppcnbsd-tdep.c	7 Nov 2003 20:44:51 -0000	1.10
+++ gdb/ppcnbsd-tdep.c	10 Nov 2003 22:44:35 -0000
@@ -210,7 +210,8 @@
 
 static enum return_value_convention
 ppcnbsd_return_value (struct gdbarch *gdbarch, struct type *valtype,
-		      struct regcache *regcache, const void *inval, void *outval)
+		      struct regcache *regcache, void *readbuf,
+		      const void *writebuf)
 {
   if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
        || TYPE_CODE (valtype) == TYPE_CODE_UNION)
@@ -223,7 +224,7 @@
     return RETURN_VALUE_STRUCT_CONVENTION;
   else
     return ppc_sysv_abi_broken_return_value (gdbarch, valtype, regcache,
-					     inval, outval);
+					     readbuf, writebuf);
 }
 
 static void
Index: gdb/stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.94
diff -u -r1.94 stack.c
--- gdb/stack.c	6 Nov 2003 19:09:46 -0000	1.94
+++ gdb/stack.c	10 Nov 2003 22:44:36 -0000
@@ -1935,8 +1935,9 @@
 	  gdb_assert (gdbarch_return_value (current_gdbarch, return_type,
 					    NULL, NULL, NULL)
 		      == RETURN_VALUE_REGISTER_CONVENTION);
-	  gdbarch_return_value (current_gdbarch, return_type, current_regcache,
-				VALUE_CONTENTS (return_value), NULL);
+	  gdbarch_return_value (current_gdbarch, return_type,
+				current_regcache, NULL /*read*/,
+				VALUE_CONTENTS (return_value) /*write*/);
 	}
     }
 
Index: gdb/values.c
===================================================================
RCS file: /cvs/src/src/gdb/values.c,v
retrieving revision 1.61
diff -u -r1.61 values.c
--- gdb/values.c	23 Oct 2003 22:36:14 -0000	1.61
+++ gdb/values.c	10 Nov 2003 22:44:36 -0000
@@ -1243,7 +1243,7 @@
 				    NULL, NULL, NULL)
 	      == RETURN_VALUE_REGISTER_CONVENTION);
   gdbarch_return_value (current_gdbarch, valtype, retbuf,
-			NULL, VALUE_CONTENTS_RAW (val));
+			VALUE_CONTENTS_RAW (val) /*read*/, NULL /*write*/);
   return val;
 }
 
Index: gdb/doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.177
diff -u -r1.177 gdbint.texinfo
--- gdb/doc/gdbint.texinfo	20 Oct 2003 15:38:02 -0000	1.177
+++ gdb/doc/gdbint.texinfo	10 Nov 2003 22:44:39 -0000
@@ -3828,7 +3828,7 @@
 Define this to convert sdb register numbers into @value{GDBN} regnums.  If not
 defined, no conversion will be done.
 
-@item enum return_value_convention gdbarch_return_value (struct gdbarch *@var{gdbarch}, struct type *@var{valtype}, struct regcache *@var{regcache}, const void *@var{inval}, void *@var{outval})
+@item enum return_value_convention gdbarch_return_value (struct gdbarch *@var{gdbarch}, struct type *@var{valtype}, struct regcache *@var{regcache}, void *@var{readbuf}, const void *@var{writebuf})
 @findex gdbarch_return_value
 @anchor{gdbarch_return_value} Given a function with a return-value of
 type @var{rettype}, return which return-value convention that function
@@ -3840,13 +3840,13 @@
 value is found in memory and the address of that memory location is
 passed in as the function's first parameter.
 
-If the register convention is being used, and @var{inval} is
-non-@code{NULL}, also copy the return-value in @var{inval} into
+If the register convention is being used, and @var{writebuf} is
+non-@code{NULL}, also copy the return-value in @var{writebuf} into
 @var{regcache}.
 
-If the register convention is being used, and @var{outval} is
+If the register convention is being used, and @var{readbuf} is
 non-@code{NULL}, also copy the return value from @var{regcache} into
-@var{outval} (@var{regcache} contains a copy of the registers from the
+@var{readbuf} (@var{regcache} contains a copy of the registers from the
 just returned function).
 
 @xref{EXTRACT_STRUCT_VALUE_ADDRESS}, for a description of how

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