Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Make "list" work again in TUI
Date: Sun, 09 Sep 2018 18:26:00 -0000	[thread overview]
Message-ID: <87musq4jdk.fsf@tromey.com> (raw)
In-Reply-To: <20180908143153.18583-1-tom@tromey.com> (Tom Tromey's message of	"Sat, 8 Sep 2018 08:31:53 -0600")

>>>>> "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


  reply	other threads:[~2018-09-09 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-08 14:32 Tom Tromey
2018-09-09 18:26 ` Tom Tromey [this message]
2018-09-12 12:20   ` Pedro Alves
2018-09-12 12:31     ` Pedro Alves
2018-09-15 21:12       ` Tom Tromey
2018-09-15 22:21         ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87musq4jdk.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox