* x86-64-tdep.h: Tewak comment.
[deliverable/binutils-gdb.git] / gdb / interps.c
index 551f416bb0fc4c1161da35ae9a5da26423c56104..82e9af690b13ca687e593a1d014ad4c2245f75dd 100644 (file)
@@ -183,7 +183,7 @@ interp_set (struct interp *interp)
   if (interp->procs->resume_proc != NULL
       && (!interp->procs->resume_proc (interp->data)))
     {
-      if (!interp_set (old_interp))
+      if (old_interp == NULL || !interp_set (old_interp))
        internal_error (__FILE__, __LINE__,
                        "Failed to initialize new interp \"%s\" %s",
                        interp->name, "and could not restore old interp!\n");
@@ -275,6 +275,8 @@ current_interp_command_loop (void)
   else if (current_interpreter != NULL
           && current_interpreter->procs->command_loop_proc != NULL)
     current_interpreter->procs->command_loop_proc (current_interpreter->data);
+  else if (event_loop_p)
+    cli_command_loop ();
   else
     command_loop ();
 }
@@ -288,7 +290,7 @@ interp_quiet_p (struct interp *interp)
     return current_interpreter->quiet_p;
 }
 
-int
+static int
 interp_set_quiet (struct interp *interp, int quiet)
 {
   int old_val = interp->quiet_p;
@@ -318,7 +320,7 @@ interp_exec (struct interp *interp, const char *command_str)
    common command hooks.  Use it when removing your interpreter in its 
    suspend proc. */
 void
-clear_interpreter_hooks ()
+clear_interpreter_hooks (void)
 {
   init_ui_hook = 0;
   print_frame_info_listing_hook = 0;
@@ -355,7 +357,7 @@ initialize_interps (void)
   /* Don't know if anything needs to be done here... */
 }
 
-void
+static void
 interpreter_exec_cmd (char *args, int from_tty)
 {
   struct interp *old_interp, *interp_to_use;
This page took 0.025401 seconds and 4 git commands to generate.