diff options
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -730,7 +730,7 @@ dont_repeat (void) /* See command.h */ -void +const char * repeat_previous () { /* Do not repeat this command, as this command is a repeating command. */ @@ -740,6 +740,11 @@ repeat_previous () so swap it with previous_saved_command_line. */ std::swap (previous_saved_command_line, saved_command_line); std::swap (previous_repeat_arguments, repeat_arguments); + + const char *prev = skip_spaces (get_saved_command_line ()); + if (*prev == '\0') + error (_("No previous command to relaunch")); + return prev; } /* See command.h. */ |