This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Is there a way to unset inferior-tty?
- From: Pedro Alves <palves at redhat dot com>
- To: Marc Khouzam <marc dot khouzam at ericsson dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Fri, 1 Jul 2016 19:51:16 +0100
- Subject: Re: Is there a way to unset inferior-tty?
- Authentication-results: sourceware.org; auth=none
- References: <E59706EF8DB1D147B15BECA3322E4BDC22AF1378 at eusaamb103 dot ericsson dot se>
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