public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Robert Rossi <bob@brasko.net>, GDB Development <gdb@sourceware.org>
Subject: Re: gdb/mi, new-ui. the console and determining when GDB is ready for the next command
Date: Tue, 29 Oct 2019 13:21:00 -0000	[thread overview]
Message-ID: <12814f17-0c65-e214-7e68-3214d3ed6ab6@redhat.com> (raw)
In-Reply-To: <CA+L9JkgmjPjVBrmSJ1xLyWJM7Lmk9gdWK1zUg9ctd2G_8vwDZA@mail.gmail.com>

On 10/23/19 12:15 AM, Robert Rossi wrote:
> Hi,
> 
> The question I have is, how are people determining when GDB is ready for
> the next
> command when using the new-ui feature of GDB?
> Are people parsing the CLI window for (gdb)?
> Am I missing something obvious?
> 
> CGDB has historically used annotations to communicate with gdb.
> This provided pre-prompt and post-prompt annotations to determine when the
> GDB prompt
> was available and ready for the next command.
> 
> A couple of years ago I decided to try to port CGDB from annotations to MI.
> At the time I asked the GDB mailing list how to determine when GDB was
> ready for the next
> command, Pedro Alves wrote:
>     GDB is ready for input when it prints the MI prompt.  There's one
> prompt that is
>     already printed after ^running that you should ignore. That's an
> historical wart.
> I got CGDB working but never completed the activity when I realized that
> using -i=mi
> caused GDB to no longer treat the terminal as an interactive terminal.
> Meaning, GDB wouldn't do tab completion and/or ask the user if they were
> ready to quit.
> 
> Now I'm considering trying this again using the GDB new-ui feature.
> In this mode the CLI remains in the starting terminal and the MI is moved
> to the new-ui tty.
> I noticed that in the new-ui window, the MI end token (gdb)\n isn't put
> out. Is this intentional?
> In this mode, what's the proper way to determine if GDB is ready for
> another command?

I'm not sure what you mean -- I see the end token being put out?

Thanks,
Pedro Alves

  parent reply	other threads:[~2019-10-29 13:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 23:15 Robert Rossi
2019-10-25  9:58 ` Robert Rossi
2019-10-29 13:21 ` Pedro Alves [this message]
2019-11-02 10:35   ` Robert Rossi
2019-11-02 17:39     ` Jonah Graham
2019-11-05 14:06     ` Pedro Alves
2020-04-11 12:12       ` Bob Rossi
2020-04-11 14:09         ` Pedro Alves

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=12814f17-0c65-e214-7e68-3214d3ed6ab6@redhat.com \
    --to=palves@redhat.com \
    --cc=bob@brasko.net \
    --cc=gdb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).