This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] mips_extract_struct_return_value: use saved regcache
- From: Michael Snyder <msnyder at redhat dot com>
- To: Andrew Cagney <ac131313 at ges dot redhat dot com>
- Cc: Michael Snyder <msnyder at cygnus dot com>, gdb-patches at sources dot redhat dot com
- Date: Tue, 10 Sep 2002 13:08:33 -0700
- Subject: Re: [PATCH] mips_extract_struct_return_value: use saved regcache
- Organization: Red Hat, Inc.
- References: <200209051830.g85IUnA03382@reddwarf.sfbay.redhat.com> <3D7D70E4.8050803@ges.redhat.com>
Andrew Cagney wrote:
>
> > ! 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);
> > ! return val;
> > }
>
> FYI,
>
> This should be regcache_cooked_read_signed() so that the address is sign
> extended.
Are you sure? Arm, i386, and cris all use unsigned.
I just copied them.
> I think val should also be a LONGEST.
OK, will change.