Is there a way to unset inferior-tty?

Pedro Alves palves@redhat.com
Thu Aug 11 17:41:00 GMT 2016


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



More information about the Gdb mailing list