From patchwork Thu Dec 12 02:35:02 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: 36758 Received: (qmail 724 invoked by alias); 12 Dec 2019 02:35:16 -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 650 invoked by uid 89); 12 Dec 2019 02:35:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, 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; Thu, 12 Dec 2019 02:35:14 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id DAAC320484; Wed, 11 Dec 2019 21:35:13 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 18E3020A87 for ; Wed, 11 Dec 2019 21:35:06 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 11C3A25BB4 for ; Wed, 11 Dec 2019 21:35:06 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Wed, 11 Dec 2019 21:35:02 -0500 From: "Tom Tromey (Code Review)" To: gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: newpatchset Subject: [review v2] Don't call set_current_source_symtab_and_line from TUI X-Gerrit-Change-Id: I1152fc7c78150974bd3d555b8568a6f88b65dbe6 X-Gerrit-Change-Number: 647 X-Gerrit-ChangeURL: X-Gerrit-Commit: dcdc6272031270c699b66ad753744dd3eb07c142 In-Reply-To: References: Reply-To: tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191212023506.11C3A25BB4@gnutoolchain-gerrit.osci.io> Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/647 ...................................................................... Don't call set_current_source_symtab_and_line from TUI update_source_window_as_is calls set_current_source_symtab_and_line, but I don't think there is any reason it should be doing this. This patch removes the call. 2019-12-11 Tom Tromey * tui/tui-winsource.c (tui_source_window_base::update_source_window_as_is): Don't call set_current_source_symtab_and_line. Change-Id: I1152fc7c78150974bd3d555b8568a6f88b65dbe6 --- M gdb/ChangeLog M gdb/tui/tui-winsource.c 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5559a94..da348cd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2019-12-11 Tom Tromey + * tui/tui-winsource.c + (tui_source_window_base::update_source_window_as_is): Don't call + set_current_source_symtab_and_line. + +2019-12-11 Tom Tromey + * tui/tui-stack.h (struct tui_locator_window) : Take a symtab_and_line. * tui/tui-stack.c (tui_locator_window::set_locator_info): Take a diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 3305c8c..1ac650b 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -190,13 +190,6 @@ update_breakpoint_info (nullptr, false); show_source_content (); update_exec_info (); - if (type == SRC_WIN) - { - symtab_and_line new_sal = sal; - - new_sal.line = sal.line + (content.size () - 2); - set_current_source_symtab_and_line (new_sal); - } } }