[review] Don't call tui_show_source from tui_ui_out

Message ID gerrit.1573774548000.Id71098e597ee4ebfef0429562baa45f537bd2c2b@gnutoolchain-gerrit.osci.io
State New, archived
Headers

Commit Message

Simon Marchi (Code Review) Nov. 14, 2019, 11:35 p.m. UTC
  Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/652
......................................................................

Don't call tui_show_source from tui_ui_out

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.

gdb/ChangeLog
2019-11-14  Tom Tromey  <tom@tromey.com>

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

Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b
---
M gdb/ChangeLog
M gdb/tui/tui-out.c
2 files changed, 6 insertions(+), 4 deletions(-)
  

Comments

Simon Marchi (Code Review) Dec. 11, 2019, 11:28 p.m. UTC | #1
Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/652
......................................................................


Patch Set 1:

I am am going to check in this series once I've re-tested it.
Rebasing today required some minor updates to one of the patches.

I am have more TUI changes lined up, so if you have any issues with
these changes in retrospect, let me know and I can fix them as well.
  
Simon Marchi (Code Review) Dec. 12, 2019, 2:31 a.m. UTC | #2
Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/652
......................................................................


Patch Set 1:

> Patch Set 1:
> 
> I am am going to check in this series once I've re-tested it.
> Rebasing today required some minor updates to one of the patches.

Testing showed that this was optimistic, so instead I'm going to submit v2.
  
Simon Marchi (Code Review) Dec. 20, 2019, 4:15 p.m. UTC | #3
Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/652
......................................................................


Patch Set 2:

I'm checking in this series now.  I've rebased it and re-run the TUI tests
on x86-64 Fedora 28.
  

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c8b9f19..a86057e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@ 
 2019-11-14  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui-out.c (tui_ui_out::do_field_string): Don't call
+	tui_show_source.
+
+2019-11-14  Tom Tromey  <tom@tromey.com>
+
 	* tui/tui-stack.h (tui_show_frame_info): Return bool.
 	* tui/tui-stack.c (tui_show_frame_info): Return bool.
 	* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
diff --git a/gdb/tui/tui-out.c b/gdb/tui/tui-out.c
index 95543ff..22b4996 100644
--- a/gdb/tui/tui-out.c
+++ b/gdb/tui/tui-out.c
@@ -60,10 +60,7 @@ 
   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);
 }