This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix TUI flicker resulting from frequent frame changes (PR tui/13378)
- From: Pedro Alves <palves at redhat dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 26 Jun 2015 15:39:08 +0100
- Subject: Re: [PATCH] Fix TUI flicker resulting from frequent frame changes (PR tui/13378)
- Authentication-results: sourceware.org; auth=none
- References: <1434688566-2549-1-git-send-email-patrick at parcs dot ath dot cx> <558D5562 dot 5090106 at redhat dot com> <CA+C-WL80ZAEB2TuJ7XJ_AiOsmO67=2rWy+STFZa5+HJjsoDw1Q at mail dot gmail dot com>
On 06/26/2015 03:09 PM, Patrick Palka wrote:
> On Fri, Jun 26, 2015 at 9:36 AM, Pedro Alves <palves@redhat.com> wrote:
>> How about we instead find some more higher level place
>> to refresh? I'm thinking that maybe whenever we display the prompt
>> might be a good place (before_prompt observer). With both the prompt
>> and normal_stop, we cover every case that needs a refresh, I think.
>
> I can imagine a problem with this. It seems that when the screen gets
> refreshed following a frame change, any scrolling that the user did in
> the source/asm windows would get undone because the screen gets
> re-centered on the currently executing line. You can see this by
> doing "frame 0", scrolling the window a bit and doing "frame 0" again:
> the scrolling gets undone. So by naively refreshing the source/asm
> windows before each prompt, we would undo scrolling for benign
> commands such as "print 1 + 2", "bt", I think...
Indeed.
> This could be fixed
> by being smarter about refreshing, by only refreshing the screen in
> the before_prompt observer if the frame information/PC has changed.
...
> It seems it would be better to only refresh the screen if the
> frame/PC actually changes as mentioned above. This can be checked in
> the observer itself -- no need for the hook, right?
Yes, I think so.
Thanks,
Pedro Alves