* [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
@ 2011-02-24 8:56 Hui Zhu
2011-02-24 8:57 ` Joel Brobecker
0 siblings, 1 reply; 11+ messages in thread
From: Hui Zhu @ 2011-02-24 8:56 UTC (permalink / raw)
To: gdb-patches ml
Cc: Doug Evans, Michael Snyder, Stan Shebs, Tom Tromey, Eli Zaretskii
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
This patch is for doc.
Thanks,
Hui
2011-02-24 Hui Zhu <teawater@gmail.com>
* agentexpr.texi (Bytecode Descriptions): Add printf.
* gdb.texinfo (Tracepoint Action Lists): Add printf.
[-- Attachment #2: tp_print_doc.txt --]
[-- Type: text/plain, Size: 1481 bytes --]
---
doc/agentexpr.texi | 7 +++++++
doc/gdb.texinfo | 6 ++++++
2 files changed, 13 insertions(+)
--- a/doc/agentexpr.texi
+++ b/doc/agentexpr.texi
@@ -489,6 +489,13 @@ named @code{trace_quick16}, for consiste
Record the value of trace state variable number @var{n} in the trace
buffer. The handling of @var{n} is as described for @code{getv}.
+@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.
+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.
+
@item @code{end} (0x27): @result{}
Stop executing bytecode; the result should be the top element of the
stack. If the purpose of the expression was to compute an lvalue or a
--- a/doc/gdb.texinfo
+++ b/doc/gdb.texinfo
@@ -10242,6 +10242,12 @@ state variables (@pxref{Trace State Vari
values to the trace buffer, as would be the case if the @code{collect}
action were used.
+@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.
+The command format is with simple @code{printf} (@pxref{Output, printf}).
+
@kindex while-stepping @r{(tracepoints)}
@item while-stepping @var{n}
Perform @var{n} single-step instruction traces after the tracepoint,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-02-24 8:56 [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc Hui Zhu
@ 2011-02-24 8:57 ` Joel Brobecker
2011-02-24 9:03 ` Hui Zhu
0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2011-02-24 8:57 UTC (permalink / raw)
To: Hui Zhu
Cc: gdb-patches ml, Doug Evans, Michael Snyder, Stan Shebs,
Tom Tromey, Eli Zaretskii
> 2011-02-24 Hui Zhu <teawater@gmail.com>
>
> * agentexpr.texi (Bytecode Descriptions): Add printf.
> * gdb.texinfo (Tracepoint Action Lists): Add printf.
Note: The doc was already approved by Eli, so it can go in as soon as
the code changes are approved.
--
Joel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-02-24 8:57 ` Joel Brobecker
@ 2011-02-24 9:03 ` Hui Zhu
2011-06-07 6:33 ` Hui Zhu
0 siblings, 1 reply; 11+ messages in thread
From: Hui Zhu @ 2011-02-24 9:03 UTC (permalink / raw)
To: Joel Brobecker
Cc: gdb-patches ml, Doug Evans, Michael Snyder, Stan Shebs,
Tom Tromey, Eli Zaretskii
OK. Thanks Joel.
Best,
Hui
On Thu, Feb 24, 2011 at 16:56, Joel Brobecker <brobecker@adacore.com> wrote:
>> 2011-02-24 Hui Zhu <teawater@gmail.com>
>>
>> * agentexpr.texi (Bytecode Descriptions): Add printf.
>> * gdb.texinfo (Tracepoint Action Lists): Add printf.
>
> Note: The doc was already approved by Eli, so it can go in as soon as
> the code changes are approved.
>
> --
> Joel
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-02-24 9:03 ` Hui Zhu
@ 2011-06-07 6:33 ` Hui Zhu
2011-06-07 7:10 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Hui Zhu @ 2011-06-07 6:33 UTC (permalink / raw)
To: gdb-patches ml
Cc: Joel Brobecker, Doug Evans, Stan Shebs, Tom Tromey, Eli Zaretskii
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
Update follow cvs trunk.
It will available on the gdb-trunk ubuntu PPA and gdb-7.3 ubuntu PPA
that I introduce in https://lkml.org/lkml/2011/6/4/65
Thanks,
Hui
On Thu, Feb 24, 2011 at 16:57, Hui Zhu <teawater@gmail.com> wrote:
> OK. Thanks Joel.
>
> Best,
> Hui
>
> On Thu, Feb 24, 2011 at 16:56, Joel Brobecker <brobecker@adacore.com> wrote:
>>> 2011-02-24 Hui Zhu <teawater@gmail.com>
>>>
>>> * agentexpr.texi (Bytecode Descriptions): Add printf.
>>> * gdb.texinfo (Tracepoint Action Lists): Add printf.
>>
>> Note: The doc was already approved by Eli, so it can go in as soon as
>> the code changes are approved.
>>
>> --
>> Joel
>>
>
[-- Attachment #2: tp_print_doc.txt --]
[-- Type: text/plain, Size: 1481 bytes --]
---
doc/agentexpr.texi | 7 +++++++
doc/gdb.texinfo | 6 ++++++
2 files changed, 13 insertions(+)
--- a/doc/agentexpr.texi
+++ b/doc/agentexpr.texi
@@ -489,6 +489,13 @@ named @code{trace_quick16}, for consiste
Record the value of trace state variable number @var{n} in the trace
buffer. The handling of @var{n} is as described for @code{getv}.
+@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.
+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.
+
@item @code{end} (0x27): @result{}
Stop executing bytecode; the result should be the top element of the
stack. If the purpose of the expression was to compute an lvalue or a
--- a/doc/gdb.texinfo
+++ b/doc/gdb.texinfo
@@ -10289,6 +10289,12 @@ state variables (@pxref{Trace State Vari
values to the trace buffer, as would be the case if the @code{collect}
action were used.
+@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.
+The command format is with simple @code{printf} (@pxref{Output, printf}).
+
@kindex while-stepping @r{(tracepoints)}
@item while-stepping @var{n}
Perform @var{n} single-step instruction traces after the tracepoint,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-06-07 6:33 ` Hui Zhu
@ 2011-06-07 7:10 ` Eli Zaretskii
2011-06-15 5:27 ` Hui Zhu
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2011-06-07 7:10 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb-patches, brobecker, dje, stan, tromey
> 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-06-07 7:10 ` Eli Zaretskii
@ 2011-06-15 5:27 ` Hui Zhu
2011-06-15 17:27 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Hui Zhu @ 2011-06-15 5:27 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches, brobecker, dje, stan, tromey
[-- Attachment #1: Type: text/plain, Size: 1561 bytes --]
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,
Hui
[-- Attachment #2: tp_print_doc.txt --]
[-- Type: text/plain, Size: 1542 bytes --]
---
doc/agentexpr.texi | 7 +++++++
doc/gdb.texinfo | 7 +++++++
2 files changed, 14 insertions(+)
--- a/doc/agentexpr.texi
+++ b/doc/agentexpr.texi
@@ -489,6 +489,13 @@ named @code{trace_quick16}, for consiste
Record the value of trace state variable number @var{n} in the trace
buffer. The handling of @var{n} is as described for @code{getv}.
+@item @code{printf} (0x31) @var{n} @var{template}: @result{}
+Print a value on the stack under control of the string @var{template}.
+@var{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 control
+of the string @var{template}.
+
@item @code{end} (0x27): @result{}
Stop executing bytecode; the result should be the top element of the
stack. If the purpose of the expression was to compute an lvalue or a
--- a/doc/gdb.texinfo
+++ b/doc/gdb.texinfo
@@ -10289,6 +10289,13 @@ state variables (@pxref{Trace State Vari
values to the trace buffer, as would be the case if the @code{collect}
action were used.
+@kindex printf, in tracepoint actions
+@item printf @var{template}, @var{expressions}@dots{}
+Print the values of one or more @var{expressions} under control of
+the string @var{template}.
+@var{template} is a format string of the same form as used with the
+@value{GDBN} command @code{printf} (@pxref{Output, printf}).
+
@kindex while-stepping @r{(tracepoints)}
@item while-stepping @var{n}
Perform @var{n} single-step instruction traces after the tracepoint,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-06-15 5:27 ` Hui Zhu
@ 2011-06-15 17:27 ` Eli Zaretskii
2011-06-24 3:22 ` Hui Zhu
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2011-06-15 17:27 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb-patches, brobecker, dje, stan, tromey
> 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-06-15 17:27 ` Eli Zaretskii
@ 2011-06-24 3:22 ` Hui Zhu
2011-06-24 6:58 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Hui Zhu @ 2011-06-24 3:22 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches, brobecker, dje, stan, tromey
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-06-24 3:22 ` Hui Zhu
@ 2011-06-24 6:58 ` Eli Zaretskii
2011-06-24 7:12 ` Hui Zhu
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2011-06-24 6:58 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb-patches, brobecker, dje, stan, tromey
> From: Hui Zhu <teawater@gmail.com>
> Date: Fri, 24 Jun 2011 11:21:16 +0800
> Cc: gdb-patches@sourceware.org, brobecker@adacore.com, dje@google.com,
> stan@codesourcery.com, tromey@redhat.com
>
> 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.
OK, in that case the documentation part of this patch is fine with me.
Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-06-24 6:58 ` Eli Zaretskii
@ 2011-06-24 7:12 ` Hui Zhu
2011-08-11 6:56 ` Hui Zhu
0 siblings, 1 reply; 11+ messages in thread
From: Hui Zhu @ 2011-06-24 7:12 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches, brobecker, dje, stan, tromey
On Fri, Jun 24, 2011 at 14:58, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Hui Zhu <teawater@gmail.com>
>> Date: Fri, 24 Jun 2011 11:21:16 +0800
>> Cc: gdb-patches@sourceware.org, brobecker@adacore.com, dje@google.com,
>> stan@codesourcery.com, tromey@redhat.com
>>
>> 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.
>
> OK, in that case the documentation part of this patch is fine with me.
>
> Thanks.
>
Thanks Eli.
Hui
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
2011-06-24 7:12 ` Hui Zhu
@ 2011-08-11 6:56 ` Hui Zhu
0 siblings, 0 replies; 11+ messages in thread
From: Hui Zhu @ 2011-08-11 6:56 UTC (permalink / raw)
To: gdb-patches; +Cc: brobecker, dje, stan, tromey, Eli Zaretskii
[-- Attachment #1: Type: text/plain, Size: 48 bytes --]
These patches are for 7.3 and trunk.
Best,
Hui
[-- Attachment #2: tp_print_doc.txt --]
[-- Type: text/plain, Size: 1542 bytes --]
---
doc/agentexpr.texi | 7 +++++++
doc/gdb.texinfo | 7 +++++++
2 files changed, 14 insertions(+)
--- a/doc/agentexpr.texi
+++ b/doc/agentexpr.texi
@@ -489,6 +489,13 @@ named @code{trace_quick16}, for consiste
Record the value of trace state variable number @var{n} in the trace
buffer. The handling of @var{n} is as described for @code{getv}.
+@item @code{printf} (0x31) @var{n} @var{template}: @result{}
+Print a value on the stack under control of the string @var{template}.
+@var{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 control
+of the string @var{template}.
+
@item @code{end} (0x27): @result{}
Stop executing bytecode; the result should be the top element of the
stack. If the purpose of the expression was to compute an lvalue or a
--- a/doc/gdb.texinfo
+++ b/doc/gdb.texinfo
@@ -10322,6 +10322,13 @@ state variables (@pxref{Trace State Vari
values to the trace buffer, as would be the case if the @code{collect}
action were used.
+@kindex printf, in tracepoint actions
+@item printf @var{template}, @var{expressions}@dots{}
+Print the values of one or more @var{expressions} under control of
+the string @var{template}.
+@var{template} is a format string of the same form as used with the
+@value{GDBN} command @code{printf} (@pxref{Output, printf}).
+
@kindex while-stepping @r{(tracepoints)}
@item while-stepping @var{n}
Perform @var{n} single-step instruction traces after the tracepoint,
[-- Attachment #3: tp_print_doc_73.txt --]
[-- Type: text/plain, Size: 1542 bytes --]
---
doc/agentexpr.texi | 7 +++++++
doc/gdb.texinfo | 7 +++++++
2 files changed, 14 insertions(+)
--- a/doc/agentexpr.texi
+++ b/doc/agentexpr.texi
@@ -489,6 +489,13 @@ named @code{trace_quick16}, for consiste
Record the value of trace state variable number @var{n} in the trace
buffer. The handling of @var{n} is as described for @code{getv}.
+@item @code{printf} (0x31) @var{n} @var{template}: @result{}
+Print a value on the stack under control of the string @var{template}.
+@var{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 control
+of the string @var{template}.
+
@item @code{end} (0x27): @result{}
Stop executing bytecode; the result should be the top element of the
stack. If the purpose of the expression was to compute an lvalue or a
--- a/doc/gdb.texinfo
+++ b/doc/gdb.texinfo
@@ -10257,6 +10257,13 @@ state variables (@pxref{Trace State Vari
values to the trace buffer, as would be the case if the @code{collect}
action were used.
+@kindex printf, in tracepoint actions
+@item printf @var{template}, @var{expressions}@dots{}
+Print the values of one or more @var{expressions} under control of
+the string @var{template}.
+@var{template} is a format string of the same form as used with the
+@value{GDBN} command @code{printf} (@pxref{Output, printf}).
+
@kindex while-stepping @r{(tracepoints)}
@item while-stepping @var{n}
Perform @var{n} single-step instruction traces after the tracepoint,
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-08-11 6:56 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-24 8:56 [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc 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
2011-06-24 6:58 ` Eli Zaretskii
2011-06-24 7:12 ` Hui Zhu
2011-08-11 6:56 ` Hui Zhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox