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]

[RFA] Fix sparc-vxworks build failure



I found this while trying to test build every sparc target.

As an aside, any particular reason one is not allowed to
cross build gdb for the sparc-*-sunos* target? :(

The typo below is pretty obvious, I think.  Trying to get the
REGISTER_BYTES of "CORE_ADDR" is pretty bogus :-)

Ok to install?

2002-04-21  David S. Miller  <davem@redhat.com>

	* remote-vxsparc.c (vx_read_register): Fix typo, we want
	REGISTER_RAW_SIZE of SP_REGNUM not CORE_ADDR.
	(vx_write_register): Likewise.

--- remote-vxsparc.c.~1~	Wed Feb 28 17:39:21 2001
+++ remote-vxsparc.c	Sun Apr 21 23:18:00 2002
@@ -102,7 +102,7 @@ vx_read_register (int regno)
      (FRAME_FIND_SAVED_REGS, in particular, depends on this).  */
 
   sp = extract_address (&registers[REGISTER_BYTE (SP_REGNUM)],
-			REGISTER_RAW_SIZE (CORE_ADDR));
+			REGISTER_RAW_SIZE (SP_REGNUM));
   write_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
 		16 * REGISTER_RAW_SIZE (L0_REGNUM));
 
@@ -173,7 +173,7 @@ vx_write_register (int regno)
       if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
 	{
 	  sp = extract_address (&registers[REGISTER_BYTE (SP_REGNUM)],
-				REGISTER_RAW_SIZE (CORE_ADDR));
+				REGISTER_RAW_SIZE (SP_REGNUM));
 	  write_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
 			16 * REGISTER_RAW_SIZE (L0_REGNUM));
 	}


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