]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* regcache.c (register_valid): Revise comments refering to "Not
authorAndrew Cagney <cagney@redhat.com>
Wed, 15 May 2002 01:01:56 +0000 (01:01 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 15 May 2002 01:01:56 +0000 (01:01 +0000)
available" and "unavailable".
* frame.c (frame_register_read): Ditto.
* findvar.c (value_of_register): Ditto.

gdb/ChangeLog
gdb/findvar.c
gdb/frame.c
gdb/regcache.c

index 3900adb89cd8108163b211513e6f52e66cd42d67..05f35b61ac8d76adaa4b115ebb23ad7c064dec25 100644 (file)
@@ -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.
index 1faaa905113f3e77dc63f33c451827e62ce84484..831ae4bc1b0e0498b574cf5b1487becca956b2f6 100644 (file)
@@ -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 */
 
index 27531501d59adb18cfad711efbf952b453b5275f..24cd90714374647f8af2691eba992d2c1cbd2d3f 100644 (file)
@@ -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 */
 
index bbad17d59c0f2adf5337ea7323921cfb48c2f6b3..11ed8c4f70d71fcfd51e54626592c2273ba9d32d 100644 (file)
@@ -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;