[PATCH v2 24/25] Add new command to create extra console/mi UI channels

Pedro Alves palves@redhat.com
Mon Mar 21 16:51:00 GMT 2016


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



More information about the Gdb-patches mailing list