From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7333 invoked by alias); 3 Mar 2005 15:01:57 -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 6867 invoked from network); 3 Mar 2005 15:01:11 -0000 Received: from unknown (HELO pluton.ispras.ru) (83.149.199.253) by sourceware.org with SMTP; 3 Mar 2005 15:01:11 -0000 Received: (qmail 7357 invoked from network); 3 Mar 2005 14:57:47 -0000 Received: from unknown (HELO truba.ispras.ru) (83.149.198.41) by pluton.ispras.ru with SMTP; 3 Mar 2005 14:57:47 -0000 Received: from truba.ispras.ru (root@localhost) by truba.ispras.ru (8.13.1/8.13.1) with SMTP id j23EvRKp022807 for ; Thu, 3 Mar 2005 17:57:27 +0300 Received: from ispserv.ispras.ru (ispserv [83.149.198.72]) by truba.ispras.ru (8.13.1/8.13.1) with ESMTP id j23EvRQk022797; Thu, 3 Mar 2005 17:57:27 +0300 Received: from ispserv.ispras.ru (localhost [127.0.0.1]) by ispserv.ispras.ru (8.12.8/8.12.8) with ESMTP id j23EtBDA023232; Thu, 3 Mar 2005 17:55:11 +0300 Received: from localhost (kostik@localhost) by ispserv.ispras.ru (8.12.8/8.12.8/Submit) with ESMTP id j23EtBRu023228; Thu, 3 Mar 2005 17:55:11 +0300 X-Authentication-Warning: ispserv.ispras.ru: kostik owned process doing -bs Date: Thu, 03 Mar 2005 15:02:00 -0000 From: Karganov Konstantin To: Bob Rossi cc: gdb@sources.redhat.com Subject: Re: Broken MI output In-Reply-To: <20050303143354.GB32613@white> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release SMTP-Filter Version 2.0.0 [0125], KAS/Release X-Spamtest-Info: Pass through X-SW-Source: 2005-03/txt/msg00026.txt.bz2 On Thu, 3 Mar 2005, Bob Rossi wrote: > A target program most likely has a special form of I/O, which is If gdb was attached to running process - yes, the program has own IO from the starting time and gdb/MI has it's own IO - all is fine here. > redirected through GDB. A program running on the host outputs directly > to the terminal, and it's impossible for GDB to know anything about it. But if the debuggee is started inside gdb it shares the same tty with the debugger. The problem of breaking MI grammar with inferior output, can be solved adding a pipe to/from the inferior, monitoring the pipe and quoting target output. > When GDB is in MI mode, why couldn't it put a pty between the inferior > and itself. And redirect it to the same terminal, where gdb is started? Or where? The only reasonable solution I see here is to have distinct ttys for a inferior (that is controlled by the operator) and for gdb (that is controlled by a GUI using MI). Konstantin.