public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Remove some unnecessary focus switches
Date: Fri, 20 Dec 2019 22:29:00 -0000	[thread overview]
Message-ID: <d4669c0fc75ad5ad2e99748f9307b5038955f9d3@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT d4669c0fc75ad5ad2e99748f9307b5038955f9d3 ***

commit d4669c0fc75ad5ad2e99748f9307b5038955f9d3
Author:     Tom Tromey <tom@tromey.com>
AuthorDate: Tue Nov 12 17:15:12 2019 -0700
Commit:     Tom Tromey <tom@tromey.com>
CommitDate: Fri Dec 20 09:15:51 2019 -0700

    Remove some unnecessary focus switches
    
    A couple of lower-level utility functions can change the TUI focus.
    This seems incorrect to me -- focus switches should only be done
    either by explicit user request, or ass a side effect of changing the
    layout.
    
    gdb/ChangeLog
    2019-12-20  Tom Tromey  <tom@tromey.com>
    
            * tui/tui-winsource.c
            (tui_source_window_base::update_source_window_as_is): Don't switch focus.
            * tui/tui-disasm.c (tui_show_disassem): Don't switch focus.
    
    Change-Id: I0a5bb8a407cf8d52e2fd23b0598eb9bce56b1251

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9ac1430ee0..0ef7b0c63b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-20  Tom Tromey  <tom@tromey.com>
+
+	* tui/tui-winsource.c
+	(tui_source_window_base::update_source_window_as_is): Don't switch focus.
+	* tui/tui-disasm.c (tui_show_disassem): Don't switch focus.
+
 2019-12-20  Tom Tromey  <tom@tromey.com>
 
 	* tui/tui-winsource.h (struct tui_source_window_base)
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 63d581bd68..11c8b30d61 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -260,7 +260,6 @@ void
 tui_show_disassem (struct gdbarch *gdbarch, CORE_ADDR start_addr)
 {
   struct symtab *s = find_pc_line_symtab (start_addr);
-  struct tui_win_info *win_with_focus = tui_win_with_focus ();
   struct tui_line_or_address val;
 
   gdb_assert (TUI_DISASM_WIN != nullptr && TUI_DISASM_WIN->is_visible ());
@@ -268,12 +267,6 @@ tui_show_disassem (struct gdbarch *gdbarch, CORE_ADDR start_addr)
   val.loa = LOA_ADDRESS;
   val.u.addr = start_addr;
   TUI_DISASM_WIN->update_source_window (gdbarch, s, val);
-
-  /* If the focus was in the src win, put it in the asm win, if the
-     source view isn't split.  */
-  if (tui_current_layout () != SRC_DISASSEM_COMMAND 
-      && win_with_focus == TUI_SRC_WIN)
-    tui_set_win_focus_to (TUI_DISASM_WIN);
 }
 
 void
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index fe1eb8fc33..72fbd46c7e 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -201,11 +201,6 @@ tui_source_window_base::update_source_window_as_is
 	  sal.symtab = s;
 	  sal.pspace = SYMTAB_PSPACE (s);
 	  set_current_source_symtab_and_line (sal);
-	  /* If the focus was in the asm win, put it in the src win if
-	     we don't have a split layout.  */
-	  if (tui_win_with_focus () == TUI_DISASM_WIN
-	      && tui_current_layout () != SRC_DISASSEM_COMMAND)
-	    tui_set_win_focus_to (this);
 	}
     }
 }


             reply	other threads:[~2019-12-20 22:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 22:29 gdb-buildbot [this message]
2019-12-20 22:18 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, branch master gdb-buildbot
2019-12-21 21:56 ` Failures on Fedora-i686, " gdb-buildbot
2019-12-21 22:10 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
2019-12-21 22:21 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2019-12-21 22:29 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-12-21 22:42 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2019-12-21 22:57 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2019-12-21 23:07 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
2019-12-21 23:09 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4669c0fc75ad5ad2e99748f9307b5038955f9d3@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).