This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 07/01/2016 07:32 PM, Marc Khouzam wrote:
> Hi,
> 
> Is there a way to unset inferior-tty?
> 
> I'm working on different possible solutions to allow Eclipse to handle when the user
> types 'run' on the GDB console.  Currently, when that happens, the inferior fails
> to restart because it tries to use the previous tty which has been closed.
> I wanted to test simply removing the setting for the tty to allow the inferior to
> start in this case.  But I can't figure out how to unset it.
> 
> Any ideas?
> Can I set it to something that would be the equivalent to unsetting it?

Can't think of any way.

Setting it to gdb's own tty ends up actually disabling gdb's tty 
settings saving/restoring, so it's not equivalent...

> 
> (gdb) show inferior-tty 
> Terminal for future runs of program being debugged is "".   <------ Want this back
> (gdb) set inferior-tty /dev/pts/3
> (gdb) show inferior-tty 
> Terminal for future runs of program being debugged is "/dev/pts/3".
> 
> (gdb) set inferior-tty
> Argument required (filename to set it to.).

I think this should just be fixed to work.

The fix should be very similar to this:

 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=811a659a779fdf93293fe1105d99e9db171a8b68

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]