+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
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;
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);
/* 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)