From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11659 invoked by alias); 17 Feb 2005 22:16:32 -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 11644 invoked from network); 17 Feb 2005 22:16:26 -0000 Received: from unknown (HELO lakermmtao09.cox.net) (68.230.240.30) by sourceware.org with SMTP; 17 Feb 2005 22:16:26 -0000 Received: from white ([68.9.64.121]) by lakermmtao09.cox.net (InterMail vM.6.01.04.00 201-2131-117-20041022) with ESMTP id <20050217221623.QVUN16302.lakermmtao09.cox.net@white>; Thu, 17 Feb 2005 17:16:23 -0500 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1D1twh-000283-00; Thu, 17 Feb 2005 17:16:27 -0500 Date: Fri, 18 Feb 2005 02:46:00 -0000 From: Bob Rossi To: Alain Magloire Cc: Andrew Cagney , Nick Roberts , gdb-patches@sources.redhat.com Subject: Re: MI testsuite improvements Message-ID: <20050217221627.GA8166@white> Mail-Followup-To: Alain Magloire , Andrew Cagney , Nick Roberts , gdb-patches@sources.redhat.com References: <4214AA1D.3030209@gnu.org> <200502171658.LAA02386@smtp.ott.qnx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200502171658.LAA02386@smtp.ott.qnx.com> User-Agent: Mutt/1.3.28i X-SW-Source: 2005-02/txt/msg00190.txt.bz2 On Thu, Feb 17, 2005 at 11:58:45AM -0500, Alain Magloire wrote: > > > > Bob Rossi wrote: > > > On Wed, Feb 16, 2005 at 09:41:56AM -0500, Andrew Cagney wrote: > > > > > >>Bob Rossi wrote: > > >> > > >> > > >>>>Let me know what you think. If you want the dbg.log files, I can provide > > >>>>them. > > >> > > >>I was kind of looking for an executive summary :-) I've attached a > > >>trimmed diff. > > >> > > >>Two things: > > >> > > >>- it should't be using --interpreter console ... > > >>Can you and/or: add a new -mi-tty command (+test, +doco) and use that; > > >>invoke GDB with the --tty=... option. Your call. Either pre-approved > > >>(but get thumbs up from Eli on the doco). > > >> > > >>- can the TTY output be identified in someway? > > >>That might make debugging easier, but if it isn't possible I guess we > > >>live with that. > > > > > > > > > OK, I like this idea a lot. I'll make a new mi function that allows you > > > to set a tty. I'll also make a new MI function that will allow you to > > > retrieve the tty device being used, both GDB and the inferior. > > > > Ok. Wonder if it should be ``set/show tty'', "tty ..." just a wrapper. > > > > > Finally, I think it would be helpful to have GDB actually be able to > > > create a pty for the front end. In case you didn't know, creating a pty > > > can be a non portable task, and GDB should be capable of doing it every > > > where it ports to. This would help out the Front Ends a lot. What do you > > > think? Something like -mi-tty-new -mi-tty-close? > > > > I suspect this is correct. > > > > Alain, how does the CDT currently hande the PTY problem? Would this be > > useful? > > > > Yes, it would be. > The problem comes from local inferior outputs that are intertwine > with MI stream(The remote case is ok since the output is properly > wrap in @"..." steam). > > CDT handles this by creating JNI code per platform that > will create a pseudo pty, the slave pty is pass to gdb > > gdb --tty /dev/ptys/n app > > And the IDE is reading at the other end of the master and > redirecting the outputs to the IDE console widget. Yes, this is similar to what I'm doing for CGDB. > > > Caveats: > > - Not all platform supports pseudo tty, we still have > no solution for Win32/cygwin. I still did not get GDB on Cygwin to work with the tty command. However, I did create my own program that opened a pty and spit out the tty device name and I wrote another program that took that as an argument and was able to do I/O with the first program. So, I think pty's work with Cygwin, but for some reason, it doesn't work with GDB on Cygwin. However, I never looked furthor into it. At some point, I'll need this to work, so if no one get's there before me ... Bob Rossi