Updare French translation for binutils and German translation for opcodes.
[deliverable/binutils-gdb.git] / gdb / tui / tui-interp.c
index 24cb5a3941448821a0207d0f3bb9b1c7d17244a1..dbb6976a3ded423d0024e6b8b78dd0d671a416c7 100644 (file)
@@ -1,6 +1,6 @@
 /* TUI Interpreter definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2014 Free Software Foundation, Inc.
+   Copyright (C) 2003-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -51,13 +51,22 @@ tui_exit (void)
   tui_disable ();
 }
 
-/* True if TUI is the top-level interpreter.  */
-static int tui_is_toplevel = 0;
-
 /* Observers for several run control events.  If the interpreter is
    quiet (i.e., another interpreter is being run with
    interpreter-exec), print nothing.  */
 
+/* Observer for the normal_stop notification.  */
+
+static void
+tui_on_normal_stop (struct bpstats *bs, int print_frame)
+{
+  if (!interp_quiet_p (tui_interp))
+    {
+      if (print_frame)
+       print_stop_event (tui_ui_out (tui_interp));
+    }
+}
+
 /* Observer for the signal_received notification.  */
 
 static void
@@ -126,8 +135,6 @@ tui_on_command_error (void)
 static void *
 tui_init (struct interp *self, int top_level)
 {
-  tui_is_toplevel = top_level;
-
   /* Install exit handler to leave the screen in a good shape.  */
   atexit (tui_exit);
 
@@ -139,6 +146,7 @@ tui_init (struct interp *self, int top_level)
     tui_initialize_readline ();
 
   /* If changing this, remember to update cli-interp.c as well.  */
+  observer_attach_normal_stop (tui_on_normal_stop);
   observer_attach_signal_received (tui_on_signal_received);
   observer_attach_end_stepping_range (tui_on_end_stepping_range);
   observer_attach_signal_exited (tui_on_signal_exited);
@@ -150,18 +158,6 @@ tui_init (struct interp *self, int top_level)
   return NULL;
 }
 
-/* True if enabling the TUI is allowed.  Example, if the top level
-   interpreter is MI, enabling curses will certainly lose.  */
-
-int
-tui_allowed_p (void)
-{
-  /* Only if TUI is the top level interpreter.  Also don't try to
-     setup curses (and print funny control characters) if we're not
-     outputting to a terminal.  */
-  return tui_is_toplevel && ui_file_isatty (gdb_stdout);
-}
-
 static int
 tui_resume (void *data)
 {
This page took 0.024245 seconds and 4 git commands to generate.