]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* interps.c (interpreter_exec_cmd): Temporarily set
authorKeith Seitz <keiths@redhat.com>
Wed, 28 Aug 2002 18:13:42 +0000 (18:13 +0000)
committerKeith Seitz <keiths@redhat.com>
Wed, 28 Aug 2002 18:13:42 +0000 (18:13 +0000)
        current interpreter to quiet, too, so that we don't get
        too many prompts when switching interpreters.

gdb/ChangeLog
gdb/interps.c

index 6d1f478a1655f8620099f6554b2918711d459f5e..7c5a0c35999e25d2abf12ba323c4bfcc646bef4b 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-28  Keith Seitz  <keiths@redhat.com>
+
+       * interps.c (interpreter_exec_cmd): Temporarily set
+       current interpreter to quiet, too, so that we don't get
+       too many prompts when switching interpreters.
+
 2002-08-28  Keith Seitz  <keiths@redhat.com>
 
        * thread.c (do_captured_thread_select): Add context-changed
index 19b108ba3c5bb149ec6aae5c988d199f25027b3e..cee469e07f01b86784b3fd5c320faf58f0627da0 100644 (file)
@@ -537,7 +537,7 @@ interpreter_exec_cmd (char *args, int from_tty)
   char **trule = NULL;
   unsigned int nrules;
   unsigned int i;
-  int old_quiet;
+  int old_quiet, use_quiet;
 
   prules = buildargv (args);
   if (prules == NULL)
@@ -563,7 +563,9 @@ interpreter_exec_cmd (char *args, int from_tty)
   if (interp_to_use == NULL)
     error ("Could not find interpreter \"%s\".", prules[0]);
 
-  old_quiet = gdb_interpreter_set_quiet (interp_to_use, 1);
+  /* Temporarily set interpreters quiet */
+  old_quiet = gdb_interpreter_set_quiet (old_interp, 1);
+  use_quiet = gdb_interpreter_set_quiet (interp_to_use, 1);
 
   if (!gdb_set_interpreter (interp_to_use))
     error ("Could not switch to interpreter \"%s\".", prules[0]);
@@ -582,7 +584,8 @@ interpreter_exec_cmd (char *args, int from_tty)
     }
 
   gdb_set_interpreter (old_interp);
-  gdb_interpreter_set_quiet (interp_to_use, old_quiet);
+  gdb_interpreter_set_quiet (interp_to_use, use_quiet);
+  gdb_interpreter_set_quiet (old_interp, old_quiet);
 }
 
 /* List the possible interpreters which could complete the given text. */