aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-03-03 18:32:44 +0000
committerTom Tromey <tromey@redhat.com>2010-03-03 18:32:44 +0000
commite8f781e22753a21b7d4d5afd6c4217e711b8da80 (patch)
treeba12b3e08a4b8a1a46950d8f980ff3034964c67e /gdb/varobj.c
parenta0e0ef55c6339931e689918519a756b6a5bcdacb (diff)
downloadgdb-e8f781e22753a21b7d4d5afd6c4217e711b8da80.zip
gdb-e8f781e22753a21b7d4d5afd6c4217e711b8da80.tar.gz
gdb-e8f781e22753a21b7d4d5afd6c4217e711b8da80.tar.bz2
PR mi/11098:
* varobj.c (install_new_value): Handle case where new print_value is NULL.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index b4b2461..c4d02c9 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1593,7 +1593,10 @@ install_new_value (struct varobj *var, struct value *value, int initial)
{
xfree (print_value);
print_value = value_get_print_value (var->value, var->format, var);
- if (!var->print_value || strcmp (var->print_value, print_value) != 0)
+ if ((var->print_value == NULL && print_value != NULL)
+ || (var->print_value != NULL && print_value == NULL)
+ || (var->print_value != NULL && print_value != NULL
+ && strcmp (var->print_value, print_value) != 0))
changed = 1;
}
if (var->print_value)