From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63147 invoked by alias); 9 Jan 2020 23:28:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 63136 invoked by uid 89); 9 Jan 2020 23:28:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*f:sk:874kxrc, fires, resurrect, displays X-HELO: mail-wm1-f65.google.com Received: from mail-wm1-f65.google.com (HELO mail-wm1-f65.google.com) (209.85.128.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Jan 2020 23:28:55 +0000 Received: by mail-wm1-f65.google.com with SMTP id p17so45496wmb.0 for ; Thu, 09 Jan 2020 15:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QsmZW2LMaZHA6v3vwzbC/uECs3csPQ1K4pnDFmRky0A=; b=gNbrK92l898iAiHmxdaPpNJ3dhzd/TtHkE8eLrsDqkjlt3XbuL8tCup+AObO0NHU2l unUw/pBcl6c4g/Ghw9Wy8aq6YGkXNYBzPbrXQLzwMYFWxWOYr6Kdjq/7SxmCCUziTumP e/K7CndhdXDOVGZWhdxjX9cbB/6WnH0Z26MBtRWVYLnGE0Pm0u2hGg7PjHK5Nh/Zj96s q+FSlfYlnV26IMSAy4SUwE++WpOrNrYpfki6uXDOSW/iT8d/otKQ89o7dS7yKmuwHTp2 XuFJDDVIKjpv/NQf6ZxquOpYEMFsGNs2THZug6B4nkFVG2GdDjUbqM3wLQsKoBns2THQ v8yw== Return-Path: Received: from localhost (host86-186-80-236.range86-186.btcentralplus.com. [86.186.80.236]) by smtp.gmail.com with ESMTPSA id i16sm134224wmb.36.2020.01.09.15.28.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Jan 2020 15:28:53 -0800 (PST) Date: Thu, 09 Jan 2020 23:28:00 -0000 From: Andrew Burgess To: Tom Tromey Cc: gdb-patches@sourceware.org, Hannes Domani Subject: Re: [PATCH 0/6] Vertical scrolling and another small bug fix Message-ID: <20200109232852.GZ3865@embecosm.com> References: <874kxrc3ha.fsf@tromey.com> <874kx7f453.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874kx7f453.fsf@tromey.com> X-Fortune: When you're ready to give up the struggle, who can you surrender to? X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00232.txt.bz2 * Tom Tromey [2020-01-07 12:38:48 -0700]: > Andrew> This is a different (simpler) approach than I originally suggested. > > I meant to reply to that one. I thought the changes in tui-hooks.c > looked reasonable. If you want to resurrect that, I'm in favor of > it. The reason I abandoned the old approach was that it moved the redisplay from the pre-prompt hook into the symtab-changed hook. This has two problems: First, calling 'tui_add_win_to_layout (SRC_WIN);' in the symtab changed hook is not OK, consider stopping after a 'continue' command, the symtab will change, but we don't want the SRC window to reappear. So, we should only redisplay SRC if the symtab changes AND the current frame doesn't change. The pre-prompt hook achieves this due to its ordering of the checks. Second, even if we could solve the above problem, there are cases where the current symtab changes multiple times due to a single command (I forget what, but I was probably testing with list at the time). If we redraw the contents of the SRC window on every symtab changes event this is a bit wasteful - though probably not critical. I've been playing with the idea of having the TUI maintain its own idea of current source location. When the global symtab change event fires we'd copy the global location into the TUI location, but, when the TUI scrolls we'd update the TUI only location. Both the SRC and ASM windows would draw their contents based on the TUI's location value. Anyway, I made a little progress, but still don't have it working, so I don't know if there's a reason why is wouldn't work... Thanks, Andrew > > Andrew> I'm still not really happy with how the tui keeps track and displays > Andrew> the current symtab_and_line > > Me too. > > Andrew> However, I think leaving the ability to vertically scroll broken isn't > Andrew> good, and I think this series is a step in the right direction > Andrew> (maybe?). > > Agreed. It all looks good to me. > > Tom