From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 368 invoked by alias); 30 Jul 2003 12:56:54 -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 358 invoked from network); 30 Jul 2003 12:56:53 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 30 Jul 2003 12:56:53 -0000 Received: from drow by nevyn.them.org with local (Exim 4.20 #1 (Debian)) id 19hqVg-000559-8t for ; Wed, 30 Jul 2003 08:56:52 -0400 Date: Wed, 30 Jul 2003 12:56:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: User-defined macros and C string Message-ID: <20030730125652.GA19481@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-07/txt/msg00339.txt.bz2 On Wed, Jul 30, 2003 at 01:47:41PM +0200, Daniel Chiaramello wrote: > Hi gdb gurus. > > Well, I'm a total gdb newbie, so sorry if the question sounds stupid... > I failed to find a forum on which I could post it, so... Here is it! > > I try to define a user-defined macro, to display parameters used when a > specific function is called. > > IE there a the following function: > > void dosomething (long theValue, char *theString) {...} > > I want to put a breakpoint on that function and display a line like > that: > "dosomething(10, "coucou");\n" > each time that function is called. > > Of course, that function is not in my code, and the caller is not > either. > > I tried the following: > define DisplayFunctionCall > echo dosomething( > output $r3 > output , \" > output $r4 > echo \");\n > end Try "help printf". Works just like the C version. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer