return 0;
if (var->root->lang_ops->value_has_mutated)
- return var->root->lang_ops->value_has_mutated (var, new_value, new_type);
+ {
+ /* The varobj module, when installing new values, explicitly strips
+ references, saying that we're not interested in those addresses.
+ But detection of mutation happens before installing the new
+ value, so our value may be a reference that we need to strip
+ in order to remain consistent. */
+ if (new_value != NULL)
+ new_value = coerce_ref (new_value);
+ return var->root->lang_ops->value_has_mutated (var, new_value, new_type);
+ }
else
return 0;
}