From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3202 invoked by alias); 3 Nov 2008 19:21:24 -0000 Received: (qmail 3155 invoked by uid 22791); 3 Nov 2008 19:21:23 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 03 Nov 2008 19:20:41 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 5E04710CE5; Mon, 3 Nov 2008 19:20:39 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 189BC10CE2; Mon, 3 Nov 2008 19:20:38 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Kx4yb-0003ZR-Vx; Mon, 03 Nov 2008 14:20:38 -0500 Date: Mon, 03 Nov 2008 19:21:00 -0000 From: Daniel Jacobowitz To: EBo Cc: gdb@sourceware.org Subject: Re: using gdb to do embedded unit/regression testing Message-ID: <20081103192037.GA13409@caradoc.them.org> Mail-Followup-To: EBo , 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.17 (2008-05-11) X-IsSubscribed: yes 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: 2008-11/txt/msg00014.txt.bz2 On Mon, Nov 03, 2008 at 12:10:51PM -0700, EBo wrote: > The current issue at hand is that `print "STRING"` only works if the program > is running AND gdb can interface with malloc. On the embedded project which I > am currently testing this idea out, malloc is not available and the print > command returns an error. What I was trying to do is simply write some > diagnostic comments to help orient myself when reading the output from gdb > which was piped to a file. If there is some other way to write diagnostic > strings to stdout other than `print "STRING"` which does not require some call > to malloc? If so please let me know. I have not seen anything like this in > the documentation yet. Try the "echo" and "printf" commands instead. These give you much more control over output. Also, "print" may not call malloc if you use a current snapshot of the GDB development sources. -- Daniel Jacobowitz CodeSourcery