Update ff4ca5ac6a2e8 to the correct version.
authorAlan Hayward <alan.hayward@arm.com>
Thu, 8 Jun 2017 14:57:12 +0000 (15:57 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Thu, 8 Jun 2017 15:00:23 +0000 (16:00 +0100)
gdb/
* mi/mi-main.c (register_changed_p): Use value_contents_eq.

gdb/ChangeLog
gdb/mi/mi-main.c

index 70736f5cc3e7b3f42b0485519af947d5d7c4db2e..094a67792d33ea51af963f0d3f0523c2692cf69b 100644 (file)
@@ -1,3 +1,7 @@
+2017-06-08  Alan Hayward  <alan.hayward@arm.com>
+
+       * mi/mi-main.c (register_changed_p): Use value_contents_eq.
+
 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
 
        * mi/mi-main.c (register_changed_p): Use cooked_read_value.
index 38d737f49f35953c7f5a9c957e918606baac63e3..755fbabafb692819abcd62f9783e7e31c755e899 100644 (file)
@@ -1125,17 +1125,8 @@ register_changed_p (int regnum, struct regcache *prev_regs,
   gdb_assert (prev_value != NULL);
   gdb_assert (this_value != NULL);
 
-  if (value_optimized_out (prev_value) != value_optimized_out (this_value)
-      || value_entirely_available (prev_value)
-        != value_entirely_available (this_value))
-    ret = 1;
-  if (value_optimized_out (prev_value)
-      || !value_entirely_available (prev_value))
-    ret = 0;
-  else
-    ret = memcmp (value_contents_all (prev_value),
-                 value_contents_all (this_value),
-                 register_size (gdbarch, regnum)) != 0;
+  ret = value_contents_eq (prev_value, 0, this_value, 0,
+                          register_size (gdbarch, regnum)) == 0;
 
   release_value (prev_value);
   release_value (this_value);