From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19288 invoked by alias); 9 Oct 2005 17:12:31 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19276 invoked by uid 22791); 9 Oct 2005 17:12:28 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 09 Oct 2005 17:12:28 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EOeio-00019R-9q; Sun, 09 Oct 2005 13:12:26 -0400 Date: Sun, 09 Oct 2005 17:12:00 -0000 From: Daniel Jacobowitz To: "jingzhao.ou" Cc: gdb@sources.redhat.com Subject: Re: Separating "shell dir" output from GDB/MI output Message-ID: <20051009171225.GA4295@nevyn.them.org> Mail-Followup-To: "jingzhao.ou" , gdb@sources.redhat.com References: <20051009123326.GA436@white> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-10/txt/msg00052.txt.bz2 On Sun, Oct 09, 2005 at 10:04:36AM -0700, jingzhao.ou wrote: > I have another problem with MI. I want to provide a GDB console in my > application so that the user can work with GDB directly if needed. > However, if I enable the MI interpreter, the normal GDB output is > suppressed. I hope that two interpreters can work at the same time and > their outputs are directed to two different output file descriptors. > This would give me exactly what I want and all I need. :-) We're a long way from being able to have multiple interpreters active at the same time. I agree it would be a good feature to have, and I've got other uses for it (in scripting). For now, for a console, you can use -interpreter-exec and get things more or less right. You can find a lot more about this in the list archives, e.g. Apple's console-quoted hack. > On 10/9/05, Bob Rossi wrote: > > I think the best idea we've had so far for solving problems like this is > > to add an option to GDB to have it output GDB/MI data on a file > > descriptor X. For instance, > > gdb -i=mi -mi-out-fd=30 > > and then when you fork/exec GDB you dup the 30 file descriptor so that > > you can read the output. > > > > Eli, do you know if this approach would be portable to windows nativly? > > I could look into implementing this feature, since it would resolve a > > *lot* of problems regarding I/O. While I think this is a good idea, what other specific problems would it solve that we haven't solved already? A simpler and more specific solution for this particular problem would be to run "shell" through pipes and MI encapsulate its output, to prevent it from playing with the user's terminal. I think that's a good idea anyway. Right now, you can probably use interactive commands via shell, but I believe that most uses of it are for things like ls, grep, or make. -- Daniel Jacobowitz CodeSourcery, LLC