diff options
author | Tom Tromey <tromey@redhat.com> | 2010-03-03 18:32:44 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-03-03 18:32:44 +0000 |
commit | e8f781e22753a21b7d4d5afd6c4217e711b8da80 (patch) | |
tree | ba12b3e08a4b8a1a46950d8f980ff3034964c67e /gdb/varobj.c | |
parent | a0e0ef55c6339931e689918519a756b6a5bcdacb (diff) | |
download | gdb-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.c | 5 |
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) |