From e8f781e22753a21b7d4d5afd6c4217e711b8da80 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 3 Mar 2010 18:32:44 +0000 Subject: [PATCH] PR mi/11098: * varobj.c (install_new_value): Handle case where new print_value is NULL. --- gdb/ChangeLog | 6 ++++++ gdb/varobj.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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) -- 2.30.2