[PATCH] Make "list" work again in TUI

Tom Tromey tom@tromey.com
Sun Sep 9 18:26:00 GMT 2018


>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> This patch makes the "list" command work again by adding some caching.
Tom> Now the TUI tracks the previously displayed frame, PC, and inferior;
Tom> and only updates the display if one of these was changed by the
Tom> previous command.

I have a question about this one now.

In the bug the original poster said that to get back to the current
location, he would use the "frame" command.  This doesn't work with my
patch, and I'm not sure how it would have worked in the past.

One part of how the TUI links to the CLI is very convoluted -- there is
a special case in tui-out to notice how the "list" command emits fields
and newlines and to use that to refresh the window.  I'd rather not do
anything this roundabout and fragile...

Other parts of the CLI use #ifdef TUI to decide what action to take when
the TUI is available.  This seems like an "old school" approach though I
must say I prefer its directness.  I wouldn't mind rewriting "list" to
do this.

Another option might be to have the frame command unconditionally notify
some observer.  Then the TUI could listen for this.

Anyway, I'd appreciate comments on which approach CLI/TUI integration
ought to ideally take.  I don't know the history here and there aren't
guiding comments that I could find.

thanks,
Tom



More information about the Gdb-patches mailing list