Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, brobecker@adacore.com,
	dje@google.com, 	stan@codesourcery.com, tromey@redhat.com
Subject: Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
Date: Fri, 24 Jun 2011 03:22:00 -0000	[thread overview]
Message-ID: <BANLkTi=9yTqZMs8U1nVsnOQUvjCRi+R9uQ@mail.gmail.com> (raw)
In-Reply-To: <838vt39fe3.fsf@gnu.org>

On Thu, Jun 16, 2011 at 01:24, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Hui Zhu <teawater@gmail.com>
>> Date: Wed, 15 Jun 2011 13:26:47 +0800
>> Cc: gdb-patches@sourceware.org, brobecker@adacore.com, dje@google.com,
>>       stan@codesourcery.com, tromey@redhat.com
>>
>> [1:text/plain Hide]
>> On Tue, Jun 7, 2011 at 15:09, Eli Zaretskii <eliz@gnu.org> wrote:
>> >> From: Hui Zhu <teawater@gmail.com>
>> >> Date: Tue, 7 Jun 2011 14:32:55 +0800
>> >> Cc: Joel Brobecker <brobecker@adacore.com>, Doug Evans <dje@google.com>,
>> >>       Stan Shebs <stan@codesourcery.com>, Tom Tromey <tromey@redhat.com>, Eli Zaretskii <eliz@gnu.org>
>> >>
>> >> +@item @code{printf} (0x31) @var{n} @var{template}: @result{}
>> >> +Print the values in the stack under the control of the string template.
>> >> +The end of @var{template} is 0x00.
>> >
>> > I don't understand the last sentence.  Do you mean to say that the
>> > template is a null-terminated string?
>> >
>> >> +If @var{n} is 0, just output the string template.
>> >> +If @var{n} is 1, pop a value from the stack and print it under the control
>> >> +of the string template.
>> >
>> > Does this support only a single value?  That's not what one would
>> > normally expect from something called "printf".  If it can pop more
>> > than one value, that should be documented.
>> >
>> >> +@kindex printf
>> >> +@item printf @var{template}, @var{expressions}@dots{}
>> >> +Print the values of one or more @var{expressions} under the control of
>> >> +the string @var{template} in @code{gdbserver} part.
>> >
>> > What do you mean by "in @code{gdbserver} part"?
>> >
>> >> +The command format is with simple @code{printf} (@pxref{Output, printf}).
>> >
>> > This sentence's intent is not clear to me.  Can you explain what were
>> > you trying to say?
>> >
>> > Thanks.
>> >
>>
>> Faint, I send an old patch.  So sorry about that.
>>
>> That attchment is the right patch.
>
> Thanks, this version is much better.  But this question is still
> unanswered:
>
>> >> +If @var{n} is 0, just output the string template.
>> >> +If @var{n} is 1, pop a value from the stack and print it under the control
>> >> +of the string template.
>> >
>> > Does this support only a single value?  That's not what one would
>> > normally expect from something called "printf".  If it can pop more
>> > than one value, that should be documented.
>

Hi Eli,

Sorry for late.

This is not the introduce of tracepoint printf.  The tracepoint printf
will work like a simple printf.
It will divide a printf string into a lot of GDB agent code.  So each
GDB agent code just support one argument.

I make each gdb agent code printf support one argument because I found
that multi-argument is hard to support.

Thanks,
Hui


  reply	other threads:[~2011-06-24  3:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24  8:56 Hui Zhu
2011-02-24  8:57 ` Joel Brobecker
2011-02-24  9:03   ` Hui Zhu
2011-06-07  6:33     ` Hui Zhu
2011-06-07  7:10       ` Eli Zaretskii
2011-06-15  5:27         ` Hui Zhu
2011-06-15 17:27           ` Eli Zaretskii
2011-06-24  3:22             ` Hui Zhu [this message]
2011-06-24  6:58               ` Eli Zaretskii
2011-06-24  7:12                 ` Hui Zhu
2011-08-11  6:56                   ` Hui Zhu

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='BANLkTi=9yTqZMs8U1nVsnOQUvjCRi+R9uQ@mail.gmail.com' \
    --to=teawater@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=dje@google.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=stan@codesourcery.com \
    --cc=tromey@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