From: Tom Tromey Date: Wed, 3 Mar 2010 18:32:44 +0000 (+0000) Subject: PR mi/11098: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8f781e22753a21b7d4d5afd6c4217e711b8da80;p=binutils-gdb.git PR mi/11098: * varobj.c (install_new_value): Handle case where new print_value is NULL. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6c347b5dc2e..269f118e53f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-03-03 Tom Tromey + + PR mi/11098: + * varobj.c (install_new_value): Handle case where new print_value + is NULL. + 2010-03-03 Dainis Jonitis PR gdb/11345: diff --git a/gdb/varobj.c b/gdb/varobj.c index b4b2461017e..c4d02c96c5e 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)