This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] mips-tdep.c: sign-extend the struct return address
- From: Michael Snyder <msnyder at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: cagney at redhat dot com
- Date: Tue, 10 Sep 2002 14:32:18 -0700
- Subject: [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;
}