From: Michael Snyder Date: Tue, 10 Sep 2002 21:31:18 +0000 (+0000) Subject: 2002-09-10 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77d8f2b47ef858ba7534d08097decc6826a53e65;p=binutils-gdb.git 2002-09-10 Michael Snyder * mips-tdep.c (mips_extract_struct_value_address): Make val a LONGEST, and use signed register read (addresses are sign- extended for mips). --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 49012e3e176..9ca1a562da7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-09-10 Michael Snyder + + * mips-tdep.c (mips_extract_struct_value_address): Make val a + LONGEST, and use signed register read (addresses are sign- + extended for mips). + 2002-09-10 Stephane Carrez * event-loop.c (gdb_do_one_event): Make public. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index eeffe24f8e8..1474393beb7 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -4907,8 +4907,9 @@ mips_extract_struct_value_address (struct regcache *regcache) /* 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); + LONGEST val; + + regcache_cooked_read_signed (regcache, V0_REGNUM, &val); return val; }