Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stephane Carrez <stephane.carrez@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH]: Fix gdb's prompt for continue in TUI SingleKey mode
Date: Tue, 13 Nov 2012 07:36:00 -0000	[thread overview]
Message-ID: <CAJJuuYr=Y5c9W1HkN3ywk8O+zkFdvVof6tUNrXW-J-GkJi9Dkw@mail.gmail.com> (raw)
In-Reply-To: <874nkuddwl.fsf@fleche.redhat.com>

Tom,

On Mon, Nov 12, 2012 at 4:44 PM, Tom Tromey <tromey@redhat.com> wrote:
>
> I don't know this code at all, but I think checking immediate_quit here
> is weird.  Partly this is because I think most uses of immediate_quit in
> gdb are incorrect, and I'd like to try to phase them out -- but having
> the TUI depend on it makes this harder.  Is there some other way to do
> it?
>
> Tom

I agree this is weird but I have not found any better solution without
changing the core gdb.

The problem is that the TUI must know that a gdb command is being executed.
This way, if it interacts with the user, it has to be in the mode
where a prompt is displayed.

If we add some boolean predicate function that tells us we are executing some
command (whatever the command, a user, a set, a show, ...) this would
be fine for me.
Some kind of 'is_executing_command_p'.

Another way is to get an observer that allows the TUI to know when a command
is finished. This way, it could do switch the TUI back to the
SingleKey once the command
is done.  Adding an observer for this looks a little bit overkill.

If anybody has a better solution, I would appreciate it too!

Stephane


  reply	other threads:[~2012-11-13  7:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-10 13:25 Stephane Carrez
2012-11-12 15:44 ` Tom Tromey
2012-11-13  7:36   ` Stephane Carrez [this message]
2012-11-13 16:33     ` 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='CAJJuuYr=Y5c9W1HkN3ywk8O+zkFdvVof6tUNrXW-J-GkJi9Dkw@mail.gmail.com' \
    --to=stephane.carrez@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /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