From patchwork Tue Nov 12 19:40:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 35846 Received: (qmail 82177 invoked by alias); 12 Nov 2019 19:46:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 82162 invoked by uid 89); 12 Nov 2019 19:46:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2019 19:46:18 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 091C120D63; Tue, 12 Nov 2019 14:40:15 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id CA90D21080; Tue, 12 Nov 2019 14:40:08 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id AD33F20AF6; Tue, 12 Nov 2019 14:40:08 -0500 (EST) X-Gerrit-PatchSet: 3 Date: Tue, 12 Nov 2019 14:40:08 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Tom Tromey , gdb-patches@sourceware.org Cc: Andrew Burgess Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] Consolidate setting of current_layout X-Gerrit-Change-Id: Id8b23797d68e607f0fcd6d29b8801869d40d1869 X-Gerrit-Change-Number: 363 X-Gerrit-ChangeURL: X-Gerrit-Commit: ed2c82c364043cf4726541cc7e8011197185b3f8 In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, tromey@sourceware.org, andrew.burgess@embecosm.com, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-76-gf8b6da0ab5 Message-Id: <20191112194008.AD33F20AF6@gnutoolchain-gerrit.osci.io> Sourceware to Gerrit sync has submitted this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/363 ...................................................................... Consolidate setting of current_layout Currently several functions in tui-layout.c set current_layout after their work is done. This moves this assignment to show_layout, instead. gdb/ChangeLog 2019-11-12 Tom Tromey * tui/tui-layout.c (show_layout): Set current_layout. (show_source_disasm_command, show_data) (show_source_or_disasm_and_command): Don't set current_layout. Change-Id: Id8b23797d68e607f0fcd6d29b8801869d40d1869 --- M gdb/ChangeLog M gdb/tui/tui-layout.c 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f1a05e2..23095e0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2019-11-12 Tom Tromey + * tui/tui-layout.c (show_layout): Set current_layout. + (show_source_disasm_command, show_data) + (show_source_or_disasm_and_command): Don't set current_layout. + +2019-11-12 Tom Tromey + * tui/tui-layout.c (_initialize_tui_layout): Move to end. 2019-11-12 Tom Tromey diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index c7f6545..ba0b367 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -91,6 +91,7 @@ break; } + current_layout = layout; tui_delete_invisible_windows (); } } @@ -418,7 +419,6 @@ tui_term_width (), 0, tui_term_height () - cmd_height); - current_layout = SRC_DISASSEM_COMMAND; } @@ -461,8 +461,6 @@ 0, total_height - 1); TUI_CMD_WIN->resize (TUI_CMD_WIN->height, tui_term_width (), 0, total_height); - - current_layout = new_layout; } void @@ -541,7 +539,6 @@ tui_term_width (), 0, src_height); - current_layout = layout_type; }