public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [review] Don't call tui_show_source from tui_ui_out
@ 2019-11-14 23:41 Tom Tromey (Code Review)
  2019-12-11 23:28 ` Tom Tromey (Code Review)
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Tom Tromey (Code Review) @ 2019-11-14 23:41 UTC (permalink / raw)
  To: gdb-patches

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(-)



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);
 }

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b
Gerrit-Change-Number: 652
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [review] Don't call tui_show_source from tui_ui_out
  2019-11-14 23:41 [review] Don't call tui_show_source from tui_ui_out Tom Tromey (Code Review)
@ 2019-12-11 23:28 ` Tom Tromey (Code Review)
  2019-12-12  2:31 ` Tom Tromey (Code Review)
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-11 23:28 UTC (permalink / raw)
  To: gdb-patches

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.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b
Gerrit-Change-Number: 652
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Wed, 11 Dec 2019 23:28:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [review] Don't call tui_show_source from tui_ui_out
  2019-11-14 23:41 [review] Don't call tui_show_source from tui_ui_out Tom Tromey (Code Review)
  2019-12-11 23:28 ` Tom Tromey (Code Review)
@ 2019-12-12  2:31 ` Tom Tromey (Code Review)
  2019-12-12  2:35 ` [review v2] " Tom Tromey (Code Review)
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-12  2:31 UTC (permalink / raw)
  To: gdb-patches

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.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b
Gerrit-Change-Number: 652
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Thu, 12 Dec 2019 02:31:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [review v2] Don't call tui_show_source from tui_ui_out
  2019-11-14 23:41 [review] Don't call tui_show_source from tui_ui_out Tom Tromey (Code Review)
  2019-12-11 23:28 ` Tom Tromey (Code Review)
  2019-12-12  2:31 ` Tom Tromey (Code Review)
@ 2019-12-12  2:35 ` Tom Tromey (Code Review)
  2019-12-20 16:15 ` Tom Tromey (Code Review)
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-12  2:35 UTC (permalink / raw)
  To: gdb-patches

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.

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

gdb/ChangeLog
2019-12-11  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
---
M gdb/ChangeLog
M gdb/tui/tui-out.c
M gdb/tui/tui.c
M gdb/tui/tui.h
4 files changed, 8 insertions(+), 18 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8292ea7..a209ff8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
 2019-12-11  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-11  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);
 }
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index dbc890a..f33ff44 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -629,18 +629,6 @@
 #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)
 {
   tui_add_win_to_layout (DISASSEM_WIN);
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index 0ac1fb4..06f3ef1 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -83,6 +83,4 @@
 
 extern int tui_active;
 
-extern void tui_show_source ();
-
 #endif /* TUI_TUI_H */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b
Gerrit-Change-Number: 652
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [review v2] Don't call tui_show_source from tui_ui_out
  2019-11-14 23:41 [review] Don't call tui_show_source from tui_ui_out Tom Tromey (Code Review)
                   ` (2 preceding siblings ...)
  2019-12-12  2:35 ` [review v2] " Tom Tromey (Code Review)
@ 2019-12-20 16:15 ` Tom Tromey (Code Review)
  2019-12-20 16:21 ` [pushed] " Sourceware to Gerrit sync (Code Review)
  2019-12-20 16:29 ` Sourceware to Gerrit sync (Code Review)
  5 siblings, 0 replies; 7+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-20 16:15 UTC (permalink / raw)
  To: gdb-patches

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.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b
Gerrit-Change-Number: 652
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Fri, 20 Dec 2019 16:15:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pushed] Don't call tui_show_source from tui_ui_out
  2019-11-14 23:41 [review] Don't call tui_show_source from tui_ui_out Tom Tromey (Code Review)
                   ` (3 preceding siblings ...)
  2019-12-20 16:15 ` Tom Tromey (Code Review)
@ 2019-12-20 16:21 ` Sourceware to Gerrit sync (Code Review)
  2019-12-20 16:29 ` Sourceware to Gerrit sync (Code Review)
  5 siblings, 0 replies; 7+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-12-20 16:21 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

Sourceware to Gerrit sync has submitted this change.

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.

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
---
M gdb/ChangeLog
M gdb/tui/tui-out.c
M gdb/tui/tui.c
M gdb/tui/tui.h
4 files changed, 8 insertions(+), 18 deletions(-)


diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fa17958..0f35def 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
 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.
 	* 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);
 }
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index dbc890a..f33ff44 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -629,18 +629,6 @@
 #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)
 {
   tui_add_win_to_layout (DISASSEM_WIN);
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index 0ac1fb4..06f3ef1 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -83,6 +83,4 @@
 
 extern int tui_active;
 
-extern void tui_show_source ();
-
 #endif /* TUI_TUI_H */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b
Gerrit-Change-Number: 652
Gerrit-PatchSet: 3
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: merged

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pushed] Don't call tui_show_source from tui_ui_out
  2019-11-14 23:41 [review] Don't call tui_show_source from tui_ui_out Tom Tromey (Code Review)
                   ` (4 preceding siblings ...)
  2019-12-20 16:21 ` [pushed] " Sourceware to Gerrit sync (Code Review)
@ 2019-12-20 16:29 ` Sourceware to Gerrit sync (Code Review)
  5 siblings, 0 replies; 7+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-12-20 16:29 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

The original change was created by Tom Tromey.

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.

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
---
M gdb/ChangeLog
M gdb/tui/tui-out.c
M gdb/tui/tui.c
M gdb/tui/tui.h
4 files changed, 8 insertions(+), 18 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fa17958..0f35def 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
 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.
 	* 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);
 }
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index dbc890a..f33ff44 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -629,18 +629,6 @@
 #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)
 {
   tui_add_win_to_layout (DISASSEM_WIN);
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index 0ac1fb4..06f3ef1 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -83,6 +83,4 @@
 
 extern int tui_active;
 
-extern void tui_show_source ();
-
 #endif /* TUI_TUI_H */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b
Gerrit-Change-Number: 652
Gerrit-PatchSet: 3
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-20 16:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-14 23:41 [review] Don't call tui_show_source from tui_ui_out Tom Tromey (Code Review)
2019-12-11 23:28 ` Tom Tromey (Code Review)
2019-12-12  2:31 ` Tom Tromey (Code Review)
2019-12-12  2:35 ` [review v2] " Tom Tromey (Code Review)
2019-12-20 16:15 ` Tom Tromey (Code Review)
2019-12-20 16:21 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-20 16:29 ` Sourceware to Gerrit sync (Code Review)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).