This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 24/25] Add new command to create extra console/mi UI channels
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 21 Mar 2016 16:51:21 +0000
- Subject: Re: [PATCH v2 24/25] Add new command to create extra console/mi UI channels
- Authentication-results: sourceware.org; auth=none
- References: <1458573675-15478-1-git-send-email-palves at redhat dot com> <1458573675-15478-25-git-send-email-palves at redhat dot com> <83twjz6bex dot fsf at gnu dot org>
Hi Eli,
On 03/21/2016 04:30 PM, Eli Zaretskii wrote:
>> From: Pedro Alves <palves@redhat.com>
>> Date: Mon, 21 Mar 2016 15:21:14 +0000
>>
>> With all the previous plumbing in place, it's now easy to add a
>> command that actually creates a new console/mi UI.
>
> Shouldn't this (and other related) code be conditional of PTYs being
> supported? Otherwise, this is just useless baggage, right?
Actually this should all work on Windows too, for example.
MI doesn't really need a PTY, so even though currently the command's
online help and git logs say usage is "new-ui INTERP TTY", that TTY part
could actually be the name of any bidirectional stream.
E.g., it could be a bidi unix domain socket, on Linux, or on Windows,
I think it should work to pass a console name, or a bidirectional
named pipe path, though I haven't tried it.
If necessary, it would also be easy to extend the command to support
separate streams for in/out/err, like, e.g.:
(gdb) new-ui INTERP IN OUT ERR
And then it'd be possible to open a new MI channel through
unidirectional named pipes, regular files, etc. too.
Thanks,
Pedro Alves