From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88228 invoked by alias); 30 Jun 2015 12:16:27 -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 88213 invoked by uid 89); 30 Jun 2015 12:16:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-oi0-f51.google.com Received: from mail-oi0-f51.google.com (HELO mail-oi0-f51.google.com) (209.85.218.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 30 Jun 2015 12:16:25 +0000 Received: by oift81 with SMTP id t81so5631204oif.3 for ; Tue, 30 Jun 2015 05:16:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=RbAjMSrPpTcKLkg6rDwj8o5kQSN6I+yX8gwY+fedifU=; b=EOei/cj/wVgVTAp38yP04BmamJQaRTn/6pW1fBvMCImGeZ6Kw/Fbg7iuSy//xZIrLu FoC+7FZya9WiWMg9DQg5ubH7BIF7f6QzTGXY2QZu/gqVOV0yJUqursMraTK1dEjvW2Na MuvOotXOkvqxifzRrWteuSSeR7Asg13Shnl6rXyFOLF4wLcWqL9tZro+qs5KLz59hWGK muZ2gxic3wBaFQBGXAajZOL4PgAwWnL/VArPVcBdIZW9a0alabd4FaCjXn25CDz6y44M 8/U+PR4w+f4F86Urwz9yNaJ2dC/4CH7gMiKRtLeJJK3QH7jLF5GZ5lz4sz+lMoLICKHZ 7cHQ== X-Gm-Message-State: ALoCoQm0o4dR/fgBI/MjayBpldSex4N8X6OSMiojmskHpcCWvYoWNqr6BpTt+HlCNWApyYYtvBUw X-Received: by 10.202.58.215 with SMTP id h206mr5045097oia.23.1435666583912; Tue, 30 Jun 2015 05:16:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.96.167 with HTTP; Tue, 30 Jun 2015 05:16:04 -0700 (PDT) In-Reply-To: <5592622D.40305@redhat.com> References: <1435372525-1374-3-git-send-email-patrick@parcs.ath.cx> <1435373402-5164-1-git-send-email-patrick@parcs.ath.cx> <5592622D.40305@redhat.com> From: Patrick Palka Date: Tue, 30 Jun 2015 12:16:00 -0000 Message-ID: Subject: Re: [PATCH 3/3] Replace TUI's select_frame hook (PR tui/13378) To: Pedro Alves Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-06/txt/msg00626.txt.bz2 On Tue, Jun 30, 2015 at 5:32 AM, Pedro Alves wrote: > 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& ... Oops, yeah.. > >> @@ -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. Good point... the sync_execution_done addendum is useless. > > 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.) That make sense. > >> 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? This one is more important, but by itself it causes source/asm-window scrolling to be reset after each command (due to the before_prompt observer) even if the frame information hasn't been changed in the meantime. Other than that they are mostly unrelated. I'll post a revised patch in a bit. > > Thanks, > Pedro Alves >