summaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-02-08 17:39:48 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-02-08 17:39:48 +0000
commitcf36289a073d10b4d150e2c9107e5252efa9b381 (patch)
tree204efebd2f8b67d1da3d083e774b40cf4d468d77 /gdb/varobj.c
parent787e9602531c9995f8010bf879d6afa098493b95 (diff)
downloadgdb-cf36289a073d10b4d150e2c9107e5252efa9b381.tar.gz
* varobj.c (install_new_value): Only call value_get_print_value
if changeable.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 578a4d1717c..be0f2bcdf26 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -953,7 +953,7 @@ install_new_value (struct varobj *var, struct value *value, int initial)
/* If the type is changeable, compare the old and the new values.
If this is the initial assignment, we don't have any old value
to compare with. */
- if (initial)
+ if (initial && changeable)
var->print_value = value_get_print_value (value, var->format);
else if (changeable)
{