* value.c (record_latest_value): Fix comment.
authorDoug Evans <dje@google.com>
Mon, 24 Feb 2014 22:01:45 +0000 (14:01 -0800)
committerDoug Evans <dje@google.com>
Mon, 24 Feb 2014 22:01:45 +0000 (14:01 -0800)
* printcmd.c (print_command_1): Remove code to handle -1 return from
record_latest_value.

gdb/ChangeLog
gdb/printcmd.c
gdb/value.c

index b642ac95acf8a4a95dae6c9fbafcb1383de2d9d8..9f9088d150992e366ae8c2b94a4311b8bdab9fd8 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-24  Doug Evans  <dje@google.com>
+
+       * value.c (record_latest_value): Fix comment.
+       * printcmd.c (print_command_1): Remove code to handle -1 return from
+       record_latest_value.
+
 2014-02-24  Pedro Alves  <palves@redhat.com>
 
        * procfs.c (procfs_target): Don't install procfs_xfer_memory as
index 10d3c230ee6d680f9e17a6e72ec8668bccf1f65e..e5fea179fa1344735b8bf10409806a97ab3406d4 100644 (file)
@@ -985,16 +985,11 @@ print_command_1 (const char *exp, int voidprint)
       struct value_print_options opts;
       int histindex = record_latest_value (val);
 
-      if (histindex >= 0)
-       annotate_value_history_begin (histindex, value_type (val));
-      else
-       annotate_value_begin (value_type (val));
+      annotate_value_history_begin (histindex, value_type (val));
 
-      if (histindex >= 0)
-       printf_filtered ("$%d = ", histindex);
+      printf_filtered ("$%d = ", histindex);
 
-      if (histindex >= 0)
-       annotate_value_history_value ();
+      annotate_value_history_value ();
 
       get_formatted_print_options (&opts, format);
       opts.raw = fmt.raw;
@@ -1002,10 +997,7 @@ print_command_1 (const char *exp, int voidprint)
       print_formatted (val, fmt.size, &opts, gdb_stdout);
       printf_filtered ("\n");
 
-      if (histindex >= 0)
-       annotate_value_history_end ();
-      else
-       annotate_value_end ();
+      annotate_value_history_end ();
     }
 
   do_cleanups (old_chain);
index 73ba18ee1380355654018a82ab1b6f5d5e2bf232..50b0245436461a8d612b0c9e5ac5cab9f1bef2e8 100644 (file)
@@ -1642,9 +1642,7 @@ set_value_component_location (struct value *component,
 /* Access to the value history.  */
 
 /* Record a new value in the value history.
-   Returns the absolute history index of the entry.
-   Result of -1 indicates the value was not saved; otherwise it is the
-   value history index of this new item.  */
+   Returns the absolute history index of the entry.  */
 
 int
 record_latest_value (struct value *val)
This page took 0.031023 seconds and 4 git commands to generate.