aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2011-11-02 23:44:21 +0000
committerStan Shebs <shebs@codesourcery.com>2011-11-02 23:44:21 +0000
commit3065dfb6b4e2e605b3601c5f71fa25de5dd4970e (patch)
treeac641720c021164a841a9c669e88e599134191e6 /gdb/doc
parent39f4f51d8bf1d516a5cca652a1d9efe8f3ef9863 (diff)
downloadgdb-3065dfb6b4e2e605b3601c5f71fa25de5dd4970e.zip
gdb-3065dfb6b4e2e605b3601c5f71fa25de5dd4970e.tar.gz
gdb-3065dfb6b4e2e605b3601c5f71fa25de5dd4970e.tar.bz2
2011-11-02 Stan Shebs <stan@codesourcery.com>
String collection for tracepoints. * NEWS: Mention string collection. * common/ax.def (tracenz): New bytecode. * ax-gdb.h (trace_string_kludge): Declare. * ax-gdb.c: Include valprint.h and c-lang.h. (trace_string_kludge): New global. (gen_traced_pop): Add string case. (agent_command): Add string case. * tracepoint.h (decode_agent_options): Declare. * tracepoint.c: Include cli-utils.h. (decode_agent_options): New function. (validate_actionline): Call it. (encode_actions_1): Ditto. * target.h (struct target_ops): New method to_supports_string_tracing. (target_supports_string_tracing): New macro. * target.c (update_current_target): Add to_supports_string_tracing. * remote.c (struct remote_state): New field string_tracing. (remote_string_tracing_feature): New function. (remote_protocol_features): New feature tracenz. (remote_supports_string_tracing): New function. (init_remote_ops): Set to_supports_string_tracing. * tracepoint.c (agent_mem_read_string): New function. (eval_agent_expr): Call it for tracenz. * server.c (handle_query): Report support for tracenz. * gdb.texinfo (Tracepoint Action Lists): Document collect/s. (General Query Packets): Describe tracenz feature. * agentexpr.texi (Bytecode Descriptions): Describe tracenz. * gdb.trace/collection.c: Add code using strings. * gdb.trace/collection.exp: Add tests of string collection.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/agentexpr.texi5
-rw-r--r--gdb/doc/gdb.texinfo21
3 files changed, 31 insertions, 1 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 1108974..f459be2 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,9 @@
+2011-11-02 Stan Shebs <stan@codesourcery.com>
+
+ * gdb.texinfo (Tracepoint Action Lists): Document collect/s.
+ (General Query Packets): Describe tracenz feature.
+ * agentexpr.texi (Bytecode Descriptions): Describe tracenz.
+
2011-10-28 Paul Koning <paul_koning@dell.com>
* gdb.texinfo (gdb.types): Rename deepitems to deep_items.
diff --git a/gdb/doc/agentexpr.texi b/gdb/doc/agentexpr.texi
index f2d51b7..2104235 100644
--- a/gdb/doc/agentexpr.texi
+++ b/gdb/doc/agentexpr.texi
@@ -489,6 +489,11 @@ 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{tracenz} (0x2f) @var{addr} @var{size} @result{}
+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{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 0f37e6e..19236b3 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -10666,7 +10666,7 @@ end
@end smallexample
@kindex collect @r{(tracepoints)}
-@item collect @var{expr1}, @var{expr2}, @dots{}
+@item collect@r{[}/@var{mods}@r{]} @var{expr1}, @var{expr2}, @dots{}
Collect values of the given expressions when the tracepoint is hit.
This command accepts a comma-separated list of any valid expressions.
In addition to global, static, or local variables, the following
@@ -10712,6 +10712,15 @@ You can give several consecutive @code{collect} commands, each one
with a single argument, or one @code{collect} command with several
arguments separated by commas; the effect is the same.
+The optional @var{mods} changes the usual handling of the arguments.
+@code{s} requests that pointers to chars be handled as strings, in
+particular collecting the contents of the memory being pointed at, up
+to the first zero. The upper bound is by default the value of the
+@code{print elements} variable; if @code{s} is followed by a decimal
+number, that is the upper bound instead. So for instance
+@samp{collect/s25 mystr} collects as many as 25 characters at
+@samp{mystr}.
+
The command @code{info scope} (@pxref{Symbols, info scope}) is
particularly useful for figuring out what data to collect.
@@ -34707,6 +34716,11 @@ These are the currently defined stub features and their properties:
@tab @samp{-}
@tab No
+@item @samp{tracenz}
+@tab No
+@tab @samp{-}
+@tab No
+
@end multitable
These are the currently defined stub features, in more detail:
@@ -34831,6 +34845,11 @@ The remote stub supports the @samp{QTEnable} (@pxref{QTEnable}) and
@samp{QTDisable} (@pxref{QTDisable}) packets that allow tracepoints
to be enabled and disabled while a trace experiment is running.
+@item tracenz
+@cindex string tracing, in remote protocol
+The remote stub supports the @samp{tracenz} bytecode for collecting strings.
+See @ref{Bytecode Descriptions} for details about the bytecode.
+
@end table
@item qSymbol::