From: Richard Earnshaw <rearnsha@arm.com>
To: gdb@sources.redhat.com
Cc: Richard.Earnshaw@arm.com
Subject: Saving/restoring the entire register set
Date: Tue, 14 May 2002 08:18:00 -0000 [thread overview]
Message-ID: <200205141517.QAA18465@cam-mail2.cambridge.arm.com> (raw)
The current implementation of generic_{push,pop}_dummy_frame use
{read,write}_register_bytes (0, addr, REGISTER_BYTES)
to save/restore the entire regset.
This is causing a problem for me with the new pseudo/raw register
separation that I'm trying to create because write_register_bytes calls
write_register_gen which calls arm_register_write and then aborts because
we are trying to directly update a raw register rather than a pseudo.
While the dummy frame code does seem to be doing something sensible, doing
it this way is somewhat of a pain, because I really want to fault out
attempts to directly poke into the raw registers (I've already tracked down
two or three bugs this way).
For this special case of saving/restoring the entire register bank, I wonder if a more suitable interface might be to have calls such as
struct regcache *regcache_alloc (); /* Allocate a new regcache structure */
regcache_save (regcache); /* Copy current registers into it */
regcache_restore (regcache); /* Restore registers from it */
regcache_free (regcache); /* Release it */
which would directly perform the precise operations that are required.
These routines could then directly use the legacy_{read,write}_register_gen
interface to fill/restore a copy of the structure.
R.
next reply other threads:[~2002-05-14 15:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-14 8:18 Richard Earnshaw [this message]
2002-05-14 8:28 ` Jason R Thorpe
2002-05-14 13:06 ` Andrew Cagney
2002-05-15 3:09 ` Richard Earnshaw
2002-05-15 7:13 ` Andrew Cagney
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=200205141517.QAA18465@cam-mail2.cambridge.arm.com \
--to=rearnsha@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=gdb@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