Re: Is there a way to unset inferior-tty?

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 08/11/2016 03:22 PM, Bob Rossi wrote:
> On Tue, Jul 26, 2016 at 03:32:31PM -0400, Bob Rossi wrote:
>> I didn't know, until today, that multiple inferiors could exist!
>> Does GDB even support one /tty per inferior in that case?
> 
> Could anyone elaborate on how gdb handles multiple inferiors with the
> /tty command,
>   https://sourceware.org/gdb/onlinedocs/gdb/Input_002fOutput.html
> 
> It doesn't look like you can set a tty per inferior, but maybe I'm
> wrong.

You definitely can:

 (gdb) show inferior-tty
 Terminal for future runs of program being debugged is "".
 (gdb) tty tty1
 (gdb) show inferior-tty
 Terminal for future runs of program being debugged is "tty1".
 (gdb) add-inferior
 Added inferior 2
 (gdb) inferior 2
 [Switching to inferior 2 [<null>] (<noexec>)]
 (gdb) show inferior-tty
 Terminal for future runs of program being debugged is "tty2".
 (gdb) inferior 1
 [Switching to inferior 1 [<null>] (<noexec>)]
 (gdb) show inferior-tty
 Terminal for future runs of program being debugged is "tty1".

Thanks,
Pedro Alves
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.