From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82970 invoked by alias); 30 Jun 2015 09:32:33 -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 82956 invoked by uid 89); 30 Jun 2015 09:32:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 30 Jun 2015 09:32:32 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id D7B0835997F; Tue, 30 Jun 2015 09:32:30 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5U9WTx0009269; Tue, 30 Jun 2015 05:32:30 -0400 Message-ID: <5592622D.40305@redhat.com> Date: Tue, 30 Jun 2015 09:32:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Patrick Palka , gdb-patches@sourceware.org Subject: Re: [PATCH 3/3] Replace TUI's select_frame hook (PR tui/13378) References: <1435372525-1374-3-git-send-email-patrick@parcs.ath.cx> <1435373402-5164-1-git-send-email-patrick@parcs.ath.cx> In-Reply-To: <1435373402-5164-1-git-send-email-patrick@parcs.ath.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-06/txt/msg00621.txt.bz2 On 06/27/2015 03:50 AM, Patrick Palka wrote: > Actually, we should not call tui_show_frame_info(NULL) when there are no > stack frames, because doing so empties the source window after invoking > "continue&". That was a last-minute change with no justification anyway. > > Here is a revised patch with a much smaller diffstat. On 06/27/2015 03:35 AM, Patrick Palka wrote: > Effectively, with this patch, frame/PC changes that do not immediately > precede an inferior-stop event or a prompt display event no longer cause > TUI's frame and register information to be updated. It seems to me that this doesn't update the info when the program stops after continue& ... > @@ -107,6 +108,9 @@ tui_on_sync_execution_done (void) > { > if (!interp_quiet_p (tui_interp)) > display_gdb_prompt (NULL); > + > + if (tui_active) > + tui_refresh_frame_and_register_information (); > } > ... when sync/foreground execution is done, we show the prompt (display_gdb_prompt above), so the before_prompt observer is already taking care of refreshing. But when background/async execution is done, we don't call sync_execution_done observers, so this hook isn't called. So I'm not seeing what this bit in tui_on_sync_execution_done is for. I think that for for stops (either after background or foreground execution), the TUI refreshes itself from within the deprecated_print_frame_info_listing_hook, called from: #0 tui_show_frame_info (fi=0xf20b50) at /home/pedro/gdb/mygit/build/../src/gdb/tui/tui-stack.c:337 #1 0x00000000005266c5 in tui_print_frame_info_listing_hook (s=0x1978100, line=92, stopline=93, noerror=0) at /home/pedro/gdb/mygit/build/../src/gdb/tui/tui-hooks.c:177 #2 0x000000000063a6f7 in print_frame_info (frame=0xf20b50, print_level=0, print_what=SRC_AND_LOC, print_args=1, set_current_sal=1) at /home/pedro/gdb/mygit/build/../src/gdb/stack.c:895 #3 0x0000000000638e2f in print_stack_frame (frame=0xf20b50, print_level=0, print_what=SRC_AND_LOC, set_current_sal=1) at /home/pedro/gdb/mygit/build/../src/gdb/stack.c:162 #4 0x0000000000632c14 in print_stop_event (ws=0x7fffffffd120) at /home/pedro/gdb/mygit/build/../src/gdb/infrun.c:6536 #5 0x0000000000632fa5 in normal_stop () at /home/pedro/gdb/mygit/build/../src/gdb/infrun.c:6701 I think this hooking in deprecated_print_frame_info_listing_hook is also a too-low-level place, and is likely contributing to flicker in other situations. I think we should move to doing whatever we do in it to a normal_stop observer instead. (tbc, doesn't have to be this patch.) > And as a result of this change and of the previous change to > tui_show_frame_info, the TUI is much more disciplined about updating the > screen, and so the flicker as described in the PR is totally gone. I think we should sort out patch 3 before patch 2. AFAICS, the important one is this one, right? Thanks, Pedro Alves