Fix an error in parse_scrolling_args
[deliverable/binutils-gdb.git] / gdb / top.c
index 857207c376735b8379bf3d705cb5399c2a977098..83a3604688b1c952d4d412ed454401b6485825bf 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
 #include "value.h"
 #include "language.h"
 #include "terminal.h"
-#include "common/job-control.h"
+#include "gdbsupport/job-control.h"
 #include "annotate.h"
 #include "completer.h"
 #include "top.h"
-#include "common/version.h"
+#include "gdbsupport/version.h"
 #include "serial.h"
 #include "main.h"
 #include "event-loop.h"
 #include "maint.h"
 #include "filenames.h"
 #include "frame.h"
-#include "common/buffer.h"
+#include "gdbsupport/buffer.h"
 #include "gdb_select.h"
-#include "common/scope-exit.h"
+#include "gdbsupport/scope-exit.h"
+#include "gdbarch.h"
 
 /* readline include files.  */
 #include "readline/readline.h"
@@ -107,10 +108,6 @@ gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stderr)
 gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdlog)
 gen_ret_current_ui_field_ptr (struct ui_out *, current_uiout)
 
-/* Initialization file name for gdb.  This is host-dependent.  */
-
-const char gdbinit[] = GDBINIT;
-
 int inhibit_gdbinit = 0;
 
 extern char lang_frame_mismatch_warn[];                /* language.c */
@@ -240,11 +237,6 @@ void (*deprecated_readline_end_hook) (void);
 void (*deprecated_attach_hook) (void);
 void (*deprecated_detach_hook) (void);
 
-/* Called during long calculations to allow GUI to repair window
-   damage, and to check for stop buttons, etc...  */
-
-void (*deprecated_interactive_hook) (void);
-
 /* Called when going to wait for the target.  Usually allows the GUI
    to run while waiting for target events.  */
 
@@ -735,7 +727,7 @@ dont_repeat (void)
 
 /* See command.h  */
 
-void
+const char *
 repeat_previous ()
 {
   /* Do not repeat this command, as this command is a repeating command.  */
@@ -745,6 +737,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.  */
@@ -2264,7 +2261,6 @@ gdb_init (char *argv0)
   initialize_progspace ();
   initialize_inferiors ();
   initialize_current_architecture ();
-  init_cli_cmds();
   init_main ();                        /* But that omits this file!  Do it now.  */
 
   initialize_stdin_serial ();
This page took 0.025346 seconds and 4 git commands to generate.