[PATCH] TUI: rewrite tui_query_hook()

Patrick Palka patrick@parcs.ath.cx
Thu Jan 8 14:14:00 GMT 2015


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

And in the meantime this patch takes advantage of the existence of a
custom TUI query hook to at least make queries within TUI to behave
nicely.

>
>>
>> Thanks,
>> Pedro Alves
>>



More information about the Gdb-patches mailing list