From patchwork Fri Dec 20 16:20:07 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: 37016 Received: (qmail 109467 invoked by alias); 20 Dec 2019 16:29:00 -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 109243 invoked by uid 89); 20 Dec 2019 16:28:59 -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; Fri, 20 Dec 2019 16:28:57 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 7C6F820642; Fri, 20 Dec 2019 11:20:35 -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 DAB6020D23; Fri, 20 Dec 2019 11:20:15 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 1D744281EA; Fri, 20 Dec 2019 11:20:15 -0500 (EST) X-Gerrit-PatchSet: 3 Date: Fri, 20 Dec 2019 11:20:07 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Tom Tromey , gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: newpatchset Subject: [pushed] Don't call tui_show_source from tui_ui_out X-Gerrit-Change-Id: Id71098e597ee4ebfef0429562baa45f537bd2c2b X-Gerrit-Change-Number: 652 X-Gerrit-ChangeURL: X-Gerrit-Commit: b4b49dcbff6b437fa8b4e2fc0c3f27b457f11310 In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191220162015.1D744281EA@gnutoolchain-gerrit.osci.io> 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 * 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 + * 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 + * 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 */