From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12726 invoked by alias); 10 Dec 2004 10:12:00 -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 12664 invoked from network); 10 Dec 2004 10:11:49 -0000 Received: from unknown (HELO cam-admin0.cambridge.arm.com) (193.131.176.58) by sourceware.org with SMTP; 10 Dec 2004 10:11:49 -0000 Received: from cam-mail2.cambridge.arm.com (cam-mail2.cambridge.arm.com [10.1.127.39]) by cam-admin0.cambridge.arm.com (8.12.10/8.12.10) with ESMTP id iBAAAumb011306 for ; Fri, 10 Dec 2004 10:10:56 GMT Received: from ZIPPY.Emea.Arm.com (bungle.Emea.arm.com [10.1.255.82]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id KAA26401 for ; Fri, 10 Dec 2004 10:11:43 GMT Received: from [10.39.0.133] ([10.39.0.133]) by ZIPPY.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 10 Dec 2004 10:11:21 +0000 Message-ID: <41B97648.5040107@arm.com> Date: Fri, 10 Dec 2004 10:12:00 -0000 From: Johannes Overmann User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: Not seeing target output in GDB/MI Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Dec 2004 10:11:21.0195 (UTC) FILETIME=[98BE2BB0:01C4DEA0] X-SW-Source: 2004-12/txt/msg00069.txt.bz2 Hi, I am trying to use the GDB/MI interface of gdb 6.2.1 and my biggest problem is currently that the output to stdout of my target program beeging debugged is beeing block buffered. I am using pipes to communicate with gdb and the output from gdb itself (e.g. responses from commands) does not seem to be block buffered, it is line buffered which is what I also need for the target output, which I get over the same file descriptor (pipe). I am using gdb to debug a simple test program on Linux. No remote debugging or something special at all. The fact that the target output is buffered leads to the behavior that when single stepping over some printf() calls I do not see the output during these steps. I see the output when the program beeing debugged exits or when I do a lot of output (the buffer gets flushed). In DDD I do not see this behavior, but I saw that DDD uses a tty to communicate with gdb and output to ttys is apparently line buffered. I can factor out two simple questions: - Is there a way to see the target output (stdout) unbuffered or line buffered and still using pipes to comminucate with gdb? - Why is the target output not visible in the target-stream-output described in the MI documentation (e.g. prefixed by @)? I see it just as any other output coming from gdb without any indication that it comes from the target. Any help on this is greatly appreciated. Regards, Johannes