aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2014-02-24 14:01:45 -0800
committerDoug Evans <dje@google.com>2014-02-24 14:01:45 -0800
commiteddf0baefe616104691f026987c9a74693cc45f2 (patch)
tree4ee987296032f84de5e272e6d0c5bfd966192012 /gdb/printcmd.c
parent50cc37c8491b151ac4fd22d8bd45387bf3cb75da (diff)
downloadgdb-eddf0baefe616104691f026987c9a74693cc45f2.zip
gdb-eddf0baefe616104691f026987c9a74693cc45f2.tar.gz
gdb-eddf0baefe616104691f026987c9a74693cc45f2.tar.bz2
* value.c (record_latest_value): Fix comment.
* printcmd.c (print_command_1): Remove code to handle -1 return from record_latest_value.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 10d3c23..e5fea17 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -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);