This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix TUI flicker resulting from frequent frame changes (PR tui/13378)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]