[gnu.gdb.bug] gdb3.1.2 - should print re-read vars ?

glenne@HPLSLA.HP.COM (Glenn Engel) (06/09/89)

I'm not sure if this is a bug or a feature but it bit me so I'll call
it a bug for now.

When using the print command with no arguments it prints the previous
print command results.  This led me to believe that  p <return> was
a shorthand for  p <somevarIjustprinted> but it doesn't re-read the
variables.  Here's an example:

(gdb) p ch
$2 = 2 '\002'                          ch is 2
(gdb) set ch = 1                       ch is now 1
(gdb) p                                print says it is 2
$3 = 2 '\002'

--
 |  Glenn R. Engel
 |  Hewlett-Packard 
 |  (206) 335-2066
 |  glenne%hplsla@hplabs.hp.com