* varobj.c (varobj_set_display_format): Recomputed
print_value.
(c_value_of_variable): Return print_value.
+2008-02-04 Vladimir Prus <vladimir@codesourcery.com>
+
+ Update stored rendition of varobj value when format changes.
+ * varobj.c (varobj_set_display_format): Recomputed
+ print_value.
+ (c_value_of_variable): Return print_value.
+
2008-02-03 Doug Evans <dje@google.com>
* eval.c (evaluate_subexp_standard): Fix type of result of mixed
var->format = variable_default_display (var);
}
+ if (varobj_value_is_changeable_p (var)
+ && var->value && !value_lazy (var->value))
+ {
+ free (var->print_value);
+ var->print_value = value_get_print_value (var->value, var->format);
+ }
+
return var->format;
}
gdb_assert (varobj_value_is_changeable_p (var));
gdb_assert (!value_lazy (var->value));
- return value_get_print_value (var->value, var->format);
+ return strdup (var->print_value);
}
}
}