From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11493 invoked by alias); 15 Apr 2011 20:53:15 -0000 Received: (qmail 11484 invoked by uid 22791); 15 Apr 2011 20:53:14 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Apr 2011 20:53:03 +0000 Received: (qmail 1261 invoked from network); 15 Apr 2011 20:53:02 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Apr 2011 20:53:02 -0000 Date: Fri, 15 Apr 2011 20:53:00 -0000 From: Daniel Jacobowitz To: Uri Moszkowicz Cc: gdb@sourceware.org Subject: Re: Wrapping GDB Message-ID: <20110415205255.GA6464@caradoc.them.org> Mail-Followup-To: Uri Moszkowicz , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00066.txt.bz2 On Fri, Apr 15, 2011 at 04:36:46PM -0400, Uri Moszkowicz wrote: > Hi, > I'm trying to use GDB to write some tests for a C++ program and am > having some trouble. The wrapper test is written in Groovy and it > seems that GDB does not send its output to stdout so that it can be > captured from a system call. Instead, it appears directly on the tty. > I realize that there is a machine interface but I don't want to use it > since the interaction has to be human readable for debugging when > tests fail. Since my test runs on the Java platform I am unable to > create a pseudo TTY for GDB. Expect seems to work but I don't want to > write my tests in Expect and no comparable implementation exists for > the Java platform. Do you have any suggestions? Is there an > undocumented switch that I can use so that GDB will send all of its > output to STDOUT/STDERR? I suggest you use the machine interface (MI) anyway. It's human readable and it's much easier to script this way. -- Daniel Jacobowitz Mentor Graphics