From: Michael Snyder <msnyder@cygnus.com>
To: gdb-patches@sources.redhat.com
Cc: cagney@redhat.com
Subject: [PATCH] mips_extract_struct_return_value: use saved regcache
Date: Thu, 05 Sep 2002 11:30:00 -0000 [thread overview]
Message-ID: <200209051830.g85IUnA03382@reddwarf.sfbay.redhat.com> (raw)
(obvious)
2002-09-05 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_extract_struct_value_address): Retrieve
V0_REGNUM from saved regcache, not from current regcache.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.119
diff -p -r1.119 mips-tdep.c
*** mips-tdep.c 24 Aug 2002 00:21:35 -0000 1.119
--- mips-tdep.c 5 Sep 2002 18:27:42 -0000
*************** mips_store_struct_return (CORE_ADDR addr
*** 4906,4917 ****
}
static CORE_ADDR
! mips_extract_struct_value_address (struct regcache *ignore)
{
/* 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. */
! return read_register (V0_REGNUM);
}
/* Exported procedure: Is PC in the signal trampoline code */
--- 4902,4915 ----
}
static CORE_ADDR
! 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;
}
/* Exported procedure: Is PC in the signal trampoline code */
next reply other threads:[~2002-09-05 18:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-05 11:30 Michael Snyder [this message]
2002-09-09 21:11 ` Andrew Cagney
2002-09-10 13:08 ` Michael Snyder
2002-09-10 13:43 ` Daniel Jacobowitz
2002-09-10 14:26 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200209051830.g85IUnA03382@reddwarf.sfbay.redhat.com \
--to=msnyder@cygnus.com \
--cc=cagney@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox