From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32437 invoked by alias); 15 Jun 2011 05:27:49 -0000 Received: (qmail 32428 invoked by uid 22791); 15 Jun 2011 05:27:48 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Jun 2011 05:27:28 +0000 Received: by fxm18 with SMTP id 18so184821fxm.0 for ; Tue, 14 Jun 2011 22:27:27 -0700 (PDT) Received: by 10.223.51.4 with SMTP id b4mr72906fag.93.1308115647092; Tue, 14 Jun 2011 22:27:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.99.80 with HTTP; Tue, 14 Jun 2011 22:26:47 -0700 (PDT) In-Reply-To: <83ei36ce2o.fsf@gnu.org> References: <20110224085616.GB2495@adacore.com> <83ei36ce2o.fsf@gnu.org> From: Hui Zhu Date: Wed, 15 Jun 2011 05:27:00 -0000 Message-ID: Subject: Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc To: Eli Zaretskii Cc: gdb-patches@sourceware.org, brobecker@adacore.com, dje@google.com, stan@codesourcery.com, tromey@redhat.com Content-Type: multipart/mixed; boundary=001517476950785a3b04a5b96849 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00204.txt.bz2 --001517476950785a3b04a5b96849 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 1539 On Tue, Jun 7, 2011 at 15:09, Eli Zaretskii wrote: >> From: Hui Zhu >> Date: Tue, 7 Jun 2011 14:32:55 +0800 >> Cc: Joel Brobecker , Doug Evans , >> =A0 =A0 =A0 Stan Shebs , Tom Tromey , Eli Zaretskii >> >> +@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. =A0Do 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 cont= rol >> +of the string template. > > Does this support only a single value? =A0That's not what one would > normally expect from something called "printf". =A0If 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. =A0Can 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, Hui --001517476950785a3b04a5b96849 Content-Type: text/plain; charset=US-ASCII; name="tp_print_doc.txt" Content-Disposition: attachment; filename="tp_print_doc.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_goxu7wh60 Content-length: 2091 LS0tCiBkb2MvYWdlbnRleHByLnRleGkgfCAgICA3ICsrKysrKysKIGRvYy9n ZGIudGV4aW5mbyAgICB8ICAgIDcgKysrKysrKwogMiBmaWxlcyBjaGFuZ2Vk LCAxNCBpbnNlcnRpb25zKCspCgotLS0gYS9kb2MvYWdlbnRleHByLnRleGkK KysrIGIvZG9jL2FnZW50ZXhwci50ZXhpCkBAIC00ODksNiArNDg5LDEzIEBA IG5hbWVkIEBjb2Rle3RyYWNlX3F1aWNrMTZ9LCBmb3IgY29uc2lzdGUKIFJl Y29yZCB0aGUgdmFsdWUgb2YgdHJhY2Ugc3RhdGUgdmFyaWFibGUgbnVtYmVy IEB2YXJ7bn0gaW4gdGhlIHRyYWNlCiBidWZmZXIuICBUaGU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