[varobj] false type-changed status for reference to Ada array
[deliverable/binutils-gdb.git] / gdb / varobj.c
index bbe42137a1b3fbfaeabfbd3228d858c09c4bbd53..10ef5b7406250f30b87fcaafab5b851cb39aa1ac 100644 (file)
@@ -1649,7 +1649,16 @@ varobj_value_has_mutated (struct varobj *var, struct value *new_value,
     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;
 }
This page took 0.025203 seconds and 4 git commands to generate.