From: Hui Zhu <teawater@gmail.com>
To: gdb-patches@sourceware.org
Cc: brobecker@adacore.com, dje@google.com, stan@codesourcery.com,
tromey@redhat.com, Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH v2] tracepoint: add new trace command "printf" and agent expression "printf" [3] doc
Date: Thu, 11 Aug 2011 06:56:00 -0000 [thread overview]
Message-ID: <CANFwon3Ez1Q5r8g=6_LQ=4iB9gDfgX7-Bkiw8K4dwpnaZFp=hQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikSpmFY6jcjYZyuupHfUf5HCTAEXA@mail.gmail.com>
[-- 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,
prev parent reply other threads:[~2011-08-11 6:56 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
2011-06-24 6:58 ` Eli Zaretskii
2011-06-24 7:12 ` Hui Zhu
2011-08-11 6:56 ` Hui Zhu [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='CANFwon3Ez1Q5r8g=6_LQ=4iB9gDfgX7-Bkiw8K4dwpnaZFp=hQ@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