Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Chiaramello <dchiaramello@madwaves.com>
To: gdb@sources.redhat.com
Subject: Re: User-defined macros and C string
Date: Wed, 30 Jul 2003 13:14:00 -0000	[thread overview]
Message-ID: <BB71C359-C28F-11D7-B1DD-0003936CB86C@madwaves.com> (raw)
In-Reply-To: <20030730125652.GA19481@nevyn.them.org>

Thanks, that's exactly what I needed!!!

Daniel.

Le mercredi, 30 juil 2003, à 14:56 Europe/Paris, Daniel Jacobowitz a 
écrit :

> 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
>


      reply	other threads:[~2003-07-30 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-30 11:47 Daniel Chiaramello
2003-07-30 12:56 ` Daniel Jacobowitz
2003-07-30 13:14   ` Daniel Chiaramello [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BB71C359-C28F-11D7-B1DD-0003936CB86C@madwaves.com \
    --to=dchiaramello@madwaves.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox