Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: gdb/doc/agentexpr.texi

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/doc/ChangeLog ('k') | gdb/doc/all-cfg.texi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/doc/agentexpr.texi
diff --git a/gdb/doc/agentexpr.texi b/gdb/doc/agentexpr.texi
index d0f6f15cc3609fb9a1ce94fe32e80d034b35e0cf..1b0a397865eb6bdf11c45fa2ba2e3fa76f365095 100644
--- a/gdb/doc/agentexpr.texi
+++ b/gdb/doc/agentexpr.texi
@@ -493,6 +493,23 @@ Record the bytes at @var{addr} in a trace buffer, for later retrieval
by GDB. Stop at either the first zero byte, or when @var{size} bytes
have been recorded, whichever occurs first.
+@item @code{printf} (0x34) @var{numargs} @var{string} @result{}
+Do a formatted print, in the style of the C function @code{printf}).
+The value of @var{numargs} is the number of arguments to expect on the
+stack, while @var{string} is the format string, prefixed with a
+two-byte length. The last byte of the string must be zero, and is
+included in the length. The format string includes escaped sequences
+just as it appears in C source, so for instance the format string
+@code{"\t%d\n"} is six characters long, and the output will consist of
+a tab character, a decimal number, and a newline. At the top of the
+stack, above the values to be printed, this bytecode will pop a
+``function'' and ``channel''. If the function is nonzero, then the
+target may treat it as a function and call it, passing the channel as
+a first argument, as with the C function @code{fprintf}. If the
+function is zero, then the target may simply call a standard formatted
+print function of its choice. In all, this bytecode pops 2 +
+@var{numargs} stack elements, and pushes nothing.
+
@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
« no previous file with comments | « gdb/doc/ChangeLog ('k') | gdb/doc/all-cfg.texi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698