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] mips-tdep.c: sign-extend the struct return address


2002-09-10  Michael Snyder  <msnyder@redhat.com>

	* mips-tdep.c (mips_extract_struct_value_address): Make val a
	LONGEST, and use signed register read (addresses are sign-
	extended for mips).

Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.120
diff -p -r1.120 mips-tdep.c
*** mips-tdep.c	5 Sep 2002 18:31:07 -0000	1.120
--- mips-tdep.c	10 Sep 2002 21:30:42 -0000
*************** mips_extract_struct_value_address (struc
*** 4907,4914 ****
    /* FIXME: This will only work at random.  The caller passes the
       struct_return address in V0, but it is not preserved.  It may
       still be there, or this may be a random value.  */
!   CORE_ADDR val;
!   regcache_cooked_read_unsigned (regcache, V0_REGNUM, &val);
    return val;
  }
  
--- 4907,4915 ----
    /* FIXME: This will only work at random.  The caller passes the
       struct_return address in V0, but it is not preserved.  It may
       still be there, or this may be a random value.  */
!   LONGEST val;
! 
!   regcache_cooked_read_signed (regcache, V0_REGNUM, &val);
    return val;
  }
  


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