public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Patrick Palka <patrick@parcs.ath.cx>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] TUI: rewrite tui_query_hook()
Date: Thu, 08 Jan 2015 14:25:00 -0000	[thread overview]
Message-ID: <CA+C-WL81c8Q-MSLZd=ST=_mZFs9eMHX9Fj54+fqP=SYRjWf3cw@mail.gmail.com> (raw)
In-Reply-To: <CA+C-WL8w=04SMCy4QfFaTBbuJvty6CZWHLiAE7iGKJNwo0n5ng@mail.gmail.com>

On Thu, Jan 8, 2015 at 9:10 AM, Patrick Palka <patrick@parcs.ath.cx> wrote:
> On Thu, Jan 8, 2015 at 8:53 AM, Pedro Alves <palves@redhat.com> wrote:
>> On 01/08/2015 12:40 PM, Patrick Palka wrote:
>>
>>> If we use
>>> gdb_readline_wrapper to print the query and wait for input then the
>>> 2nd annotation will not be printed in a timely manner because
>>> gdb_readline_wrapper blocks until a response is given by the user.
>>
>> Can't we just cat the annotations bits into the query string
>> itself?  IOW, make them part of the secondary prompt.
>
> I'm not sure because the annotations contain newlines, so (with
> annotations enabled) the prompt passed to readline would have
> newlines.  I do not know if readline supports multi-line prompts.

Actually readline does support multi-line prompts because what you
mentioned is exactly what prompt_for_continue() does.  It concatenates
the annotations to the prompt string and passes the multi-line prompt
to gdb_readline_wrapper().  So it will be easy to consolidate these
two query hooks.  I will try to do so.

>
> But IMO a consolidation of the custom TUI query hook and the default
> query hook is a quite separate endeavor.  I think it should be left as
> future work.
>
>>
>> Thanks,
>> Pedro Alves
>>

  parent reply	other threads:[~2015-01-08 14:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  3:51 Patrick Palka
2015-01-08 11:03 ` Pedro Alves
2015-01-08 12:40   ` Patrick Palka
2015-01-08 13:53     ` Pedro Alves
2015-01-08 14:10       ` Patrick Palka
2015-01-08 14:14         ` Patrick Palka
2015-01-08 14:25         ` Patrick Palka [this message]
2015-01-08 15:17   ` [PATCH] Consolidate the custom TUI query hook with default query hook Patrick Palka
2015-01-08 15:50     ` Pedro Alves
2015-01-08 13:31 ` [PATCH] TUI: rewrite tui_query_hook() Eli Zaretskii
2015-01-08 13:43   ` Patrick Palka
2015-01-08 13:57     ` Pedro Alves
2015-01-08 14:14     ` Eli Zaretskii
2015-01-08 14:27       ` Patrick Palka

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='CA+C-WL81c8Q-MSLZd=ST=_mZFs9eMHX9Fj54+fqP=SYRjWf3cw@mail.gmail.com' \
    --to=patrick@parcs.ath.cx \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).