From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17285 invoked by alias); 30 Jul 2003 13:14:24 -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 17262 invoked from network); 30 Jul 2003 13:14:23 -0000 Received: from unknown (HELO blues) (217.26.192.93) by sources.redhat.com with SMTP; 30 Jul 2003 13:14:23 -0000 Received: from madwaves.com (193.251.10.44) by blues with MERCUR Mailserver (v4.02.11 MTY0NzMtNjE1MC00ODc3) for ; Wed, 30 Jul 2003 14:32:45 +0200 Date: Wed, 30 Jul 2003 13:14:00 -0000 Subject: Re: User-defined macros and C string Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Daniel Chiaramello To: gdb@sources.redhat.com Content-Transfer-Encoding: quoted-printable In-Reply-To: <20030730125652.GA19481@nevyn.them.org> Message-Id: X-SW-Source: 2003-07/txt/msg00340.txt.bz2 Thanks, that's exactly what I needed!!! Daniel. Le mercredi, 30 juil 2003, =E0 14:56 Europe/Paris, Daniel Jacobowitz a=20 =E9crit : > 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=20 >> 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=20 >> 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. > > --=20 > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer >