Don't call tui_show_source from tui_ui_out
authorTom Tromey <tom@tromey.com>
Wed, 13 Nov 2019 23:47:58 +0000 (16:47 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 20 Dec 2019 16:15:59 +0000 (09:15 -0700)
This removes the call to tui_show_source from tui_ui_out.  This always
seemed like a hack, and now that the TUI is using the proper
observers, it seems not to be needed.

The rest of the logic remains, unfortunately, because it is needed to
suppress some gdb output in the TUI case.  We could probably find a
nicer way to do this (maybe a ui_out_flag), but I haven't attempted
this.

This was the last caller of tui_show_source, so this is removed as
well.

gdb/ChangeLog
2019-12-20  Tom Tromey  <tom@tromey.com>

* tui/tui.c (tui_show_source): Remove.
* tui/tui.h (tui_show_source): Don't declare.
* tui/tui-out.c (tui_ui_out::do_field_string): Don't call
tui_show_source.

Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b

gdb/ChangeLog
gdb/tui/tui-out.c
gdb/tui/tui.c
gdb/tui/tui.h

index fa1795811836c94074a02d529eb24cf85a412146..0f35deff3509b9e4ca78ab860b08ae291afca9f5 100644 (file)
@@ -1,3 +1,10 @@
+2019-12-20  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui.c (tui_show_source): Remove.
+       * tui/tui.h (tui_show_source): Don't declare.
+       * tui/tui-out.c (tui_ui_out::do_field_string): Don't call
+       tui_show_source.
+
 2019-12-20  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-stack.h (tui_show_frame_info): Return bool.
index 95543ff06a21ba8b0369f3a17314c91b3355994a..22b4996a1bb969828bf38ca8c34c7061ca3ba18d 100644 (file)
@@ -60,10 +60,7 @@ tui_ui_out::do_field_string (int fldno, int width, ui_align align,
   m_start_of_line++;
 
   if (fldname && m_line > 0 && strcmp (fldname, "fullname") == 0)
-    {
-      tui_show_source ();
-      return;
-    }
+    return;
 
   cli_ui_out::do_field_string (fldno, width, align, fldname, string, style);
 }
index dbc890a9ade1ed5eacb181811e77248e9ca53d44..f33ff44128814e0ca9b4d8c9ae432caca62ebba6 100644 (file)
@@ -628,18 +628,6 @@ tui_reset (void)
 }
 #endif
 
-void
-tui_show_source ()
-{
-  struct symtab_and_line cursal = get_current_source_symtab_and_line ();
-
-  /* Make sure that the source window is displayed.  */
-  tui_add_win_to_layout (SRC_WIN);
-
-  tui_update_source_windows_with_line (cursal);
-  tui_update_locator_fullname (cursal.symtab);
-}
-
 void
 tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr)
 {
index 0ac1fb4a9c2e3d27928deffdc17b86a1e763cfab..06f3ef1f01beb269822fe4a08335df59398dc775 100644 (file)
@@ -83,6 +83,4 @@ extern void tui_set_key_mode (enum tui_key_mode mode);
 
 extern int tui_active;
 
-extern void tui_show_source ();
-
 #endif /* TUI_TUI_H */
This page took 0.031049 seconds and 4 git commands to generate.