From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100401 invoked by alias); 1 Jul 2016 18:51:30 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 100390 invoked by uid 89); 1 Jul 2016 18:51:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Want, Terminal, Argument, inferior-tty X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 01 Jul 2016 18:51:19 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 04F893822; Fri, 1 Jul 2016 18:51:18 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u61IpGjV029971; Fri, 1 Jul 2016 14:51:17 -0400 Subject: Re: Is there a way to unset inferior-tty? To: Marc Khouzam , "gdb@sourceware.org" References: From: Pedro Alves Message-ID: <302246af-a394-4a76-5223-5cac924bda9a@redhat.com> Date: Fri, 01 Jul 2016 18:51:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-07/txt/msg00001.txt.bz2 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