diff options
author | Michael Snyder <msnyder@vmware.com> | 2000-11-17 01:30:53 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2000-11-17 01:30:53 +0000 |
commit | 165cd47f5eabd61fc53c930450493378ac9f1a8c (patch) | |
tree | f1532e96031437b7a8a3b83242b37f3a42c88b0c /gdb | |
parent | ca683b78f3320f7442f14e78e6672553f71f1585 (diff) | |
download | gdb-165cd47f5eabd61fc53c930450493378ac9f1a8c.zip gdb-165cd47f5eabd61fc53c930450493378ac9f1a8c.tar.gz gdb-165cd47f5eabd61fc53c930450493378ac9f1a8c.tar.bz2 |
2000-11-16 Michael Snyder <msnyder@cleaver.cygnus.com>
* regcache.c (read_register_bytes): Failing to set register_valid
is not necessarily an error, if the register is a pseudo-register.
Some pseudo-registers are never marked as valid, so that they will
be read anew every time. Determining if a pseudo-register is valid
(or should be marked invalid) may be difficult, whereas just
recomputing it may be cheap.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/regcache.c | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index af10432..8507deb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2000-11-16 Michael Snyder <msnyder@cleaver.cygnus.com> + + * regcache.c (read_register_bytes): Failing to set register_valid + is not necessarily an error, if the register is a pseudo-register. + Some pseudo-registers are never marked as valid, so that they will + be read anew every time. Determining if a pseudo-register is valid + (or should be marked invalid) may be difficult, whereas just + recomputing it may be cheap. + Thu Nov 16 09:47:57 2000 David Taylor <taylor@redhat.com> * tracepoint.c (trace_find_tracepoint_command): Replace call to diff --git a/gdb/regcache.c b/gdb/regcache.c index 2326b34..104bff7 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -391,7 +391,14 @@ read_register_bytes (int inregbyte, char *myaddr, int inlen) FETCH_PSEUDO_REGISTER (regno); if (!register_valid[regno]) - error ("read_register_bytes: Couldn't update register %d.", regno); + { + /* Sometimes pseudoregs are never marked valid, so that they + will be fetched every time (it can be complicated to know + if a pseudoreg is valid, while "fetching" them can be cheap). + */ + if (regno < NUM_REGS) + error ("read_register_bytes: Couldn't update register %d.", regno); + } } if (myaddr != NULL) |