From f994e27a0ba0cb8488b78ba35a45795976311bb0 Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Mon, 21 Feb 2011 08:40:27 +0000 Subject: [PATCH] 2011-02-21 Hui Zhu * agentexpr.texi (Bytecode Descriptions): Add printf. * gdb.texinfo (Tracepoint Action Lists): Add printf. --- gdb/doc/ChangeLog | 5 +++++ gdb/doc/agentexpr.texi | 7 +++++++ gdb/doc/gdb.texinfo | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 58f2814a0d1..ee9a63f21c1 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2011-02-21 Hui Zhu + + * agentexpr.texi (Bytecode Descriptions): Add printf. + * gdb.texinfo (Tracepoint Action Lists): Add printf. + 2011-02-18 Tom Tromey * agentexpr.texi (Bytecode Descriptions): Document pick and rot. diff --git a/gdb/doc/agentexpr.texi b/gdb/doc/agentexpr.texi index f2d51b74053..5a360df8fae 100644 --- a/gdb/doc/agentexpr.texi +++ b/gdb/doc/agentexpr.texi @@ -489,6 +489,13 @@ named @code{trace_quick16}, for consistency. 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 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index e16065b994b..f8b7e2db117 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -10242,6 +10242,12 @@ state variables (@pxref{Trace State Variables}) without adding those 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, -- 2.30.2