From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20158 invoked by alias); 20 Feb 2005 15:21:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 20114 invoked from network); 20 Feb 2005 15:21:29 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 20 Feb 2005 15:21:29 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j1KFLSRM007450 for ; Sun, 20 Feb 2005 10:21:29 -0500 Received: from localhost.redhat.com (vpn50-50.rdu.redhat.com [172.16.50.50]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j1KFLQK07111; Sun, 20 Feb 2005 10:21:27 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id B2A037D79; Sun, 20 Feb 2005 10:18:47 -0500 (EST) Message-ID: <4218AA55.7080304@gnu.org> Date: Mon, 21 Feb 2005 02:12:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Bob Rossi Cc: Alain Magloire , Nick Roberts , gdb-patches@sources.redhat.com Subject: Re: MI testsuite improvements References: <20050218180003.GA9549@white> <200502181927.OAA17870@smtp.ott.qnx.com> <20050219000623.GA9877@white> In-Reply-To: <20050219000623.GA9877@white> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-02/txt/msg00212.txt.bz2 Bob Rossi wrote: > On Fri, Feb 18, 2005 at 02:27:24PM -0500, Alain Magloire wrote: > >>>>Ok. Wonder if it should be ``set/show tty'', "tty ..." just a wrapper. >>> >>>Ok, I'm going to implement this before even thinking about anything >>>else. Do you care what file the -mi-tty command's go in? or should I >>>create a new file? >>> >>>Also, is there an easy way to use the set/show internally to GDB? This >>>way, as you suggessted, there will be 3 ways to access the inferior's >>>tty device name. >>> >>> - through the MI commands >>> - through the set/show >>> - and you can only set the tty through the 'tty' console command >>> there is no way to get the name. This should probably be >>> depricated ... >>> >>>Internally, they should all use the same data, so, is there an >>>interface to modify the set/show value internally to GDB? >>> >> >>Bob, >> I did not see the original of your proposal, so .. >>Am I correct to assume that the "show" tty will print the master side >>and not the slave or vice versa ... >>Meaning the frontends are interested in the other side of the pipe >>not the tty given by gdb to the inferior. > > > Hi Alain, > > There are 2 different ideas being suggested, > - To create an mi command, that does the same thing as the console > 'tty' command, and each of these internally can be wrappers around > some data that can be accessed with GDB's set/show mechanism. For > example, > -mi-set-tty /dev/pts/1 (mi command) > tty /dev/pts/1 (console command) > set tty /dev/pts/1 (set command) and I belive: set tty I need to confirm it but it appears that there's an ``optional filename'' class of variable (grep for filename_completer in the sources). If the last is implemented, an existing MI command should already let you set/show the variable. > - The second idea was to have GDB internally create a pty. That would > result in a master and slave side. Neither of these are important, > AFAIK, only the slavename (file name of the terminal created, > ie. /dev/pts/1) is important. For example, here is what could > happen > 1. The user asks GDB to open a new pty and the name is given back > -mi-create-pty > /dev/pts/1 > 2. The user asks GDB to use that pty for the inferior > -mi-set-tty /dev/pts/1 > 3. The user opens /dev/pts/1 in there own program to read the > output of the inferior. > 4. The user asks GDB to close the device > -mi-destroy-pty /dev/pts/1 > > Either way, it will probably be a while before I have time to work on > the second task, since I'm already swamped trying to validate the MI > testsuite with a syntax checker and changing the grammar to match > what GDB actually outputs. Andrew