aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-05-15 01:01:56 +0000
committerAndrew Cagney <cagney@redhat.com>2002-05-15 01:01:56 +0000
commitc97dcfc7b8acc93a4be859f191ed37ac0c64efda (patch)
tree9ecc601b514c5221e73885f3b6cf4c42880d8706 /gdb
parentc2c01aa78c11fbb58e005848ff2dbaf6aed2e408 (diff)
downloadgdb-c97dcfc7b8acc93a4be859f191ed37ac0c64efda.zip
gdb-c97dcfc7b8acc93a4be859f191ed37ac0c64efda.tar.gz
gdb-c97dcfc7b8acc93a4be859f191ed37ac0c64efda.tar.bz2
* regcache.c (register_valid): Revise comments refering to "Not
available" and "unavailable". * frame.c (frame_register_read): Ditto. * findvar.c (value_of_register): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/findvar.c7
-rw-r--r--gdb/frame.c11
-rw-r--r--gdb/regcache.c8
4 files changed, 28 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3900adb..05f35b6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2002-05-14 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (register_valid): Revise comments refering to "Not
+ available" and "unavailable".
+ * frame.c (frame_register_read): Ditto.
+ * findvar.c (value_of_register): Ditto.
+
2002-05-15 Andrew Cagney <cagney@redhat.com>
* Makefile.in (remote_sim_h): Replace remote-sim_h.
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 1faaa90..831ae4b 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -308,6 +308,13 @@ value_of_register (int regnum, struct frame_info *frame)
get_saved_register (raw_buffer, &optim, &addr,
frame, regnum, &lval);
+ /* FIXME: cagney/2002-05-15: This test is just bogus.
+
+ It indicates that the target failed to supply a value for a
+ register because it was "not available" at this time. Problem
+ is, the target still has the register and so get saved_register()
+ may be returning a value saved on the stack. */
+
if (register_cached (regnum) < 0)
return NULL; /* register value not available */
diff --git a/gdb/frame.c b/gdb/frame.c
index 2753150..24cd907 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -157,10 +157,13 @@ frame_register_read (struct frame_info *frame, int regnum, void *myaddr)
get_saved_register (myaddr, &optim, (CORE_ADDR *) NULL, frame,
regnum, (enum lval_type *) NULL);
- /* FIXME: cagney/2002-04-10: This test is just bogus. It is no
- indication of the validity of the register. The value could
- easily be found (on the stack) even though the corresponding
- register isn't available. */
+ /* FIXME: cagney/2002-05-15: This test, is just bogus.
+
+ It indicates that the target failed to supply a value for a
+ register because it was "not available" at this time. Problem
+ is, the target still has the register and so get saved_register()
+ may be returning a value saved on the stack. */
+
if (register_cached (regnum) < 0)
return 0; /* register value not available */
diff --git a/gdb/regcache.c b/gdb/regcache.c
index bbad17d..11ed8c4 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -45,7 +45,13 @@ char *registers;
/* REGISTER_VALID is 0 if the register needs to be fetched,
1 if it has been fetched, and
-1 if the register value was not available.
- "Not available" means don't try to fetch it again. */
+
+ "Not available" indicates that the target is not not able to supply
+ the register at this state. The register may become available at a
+ later time (after the next resume). This often occures when GDB is
+ manipulating a target that contains only a snapshot of the entire
+ system being debugged - some of the registers in such a system may
+ not have been saved. */
signed char *register_valid;