aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/agentexpr.texi
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2009-07-14 21:40:34 +0000
committerStan Shebs <shebs@codesourcery.com>2009-07-14 21:40:34 +0000
commit782b2b07842dcec0cbd9c4248b155d7acf8c8dbe (patch)
treeac5c0fb0117ac15be913c0fa20a659ec90ef1028 /gdb/doc/agentexpr.texi
parentf662c3bce4df8aa5361122ea49dec9ee0e14dfad (diff)
downloadgdb-782b2b07842dcec0cbd9c4248b155d7acf8c8dbe.zip
gdb-782b2b07842dcec0cbd9c4248b155d7acf8c8dbe.tar.gz
gdb-782b2b07842dcec0cbd9c4248b155d7acf8c8dbe.tar.bz2
gdb/
Conditional tracepoints. * ax-gdb.h (gen_eval_for_expr): Declare. * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL and other comparisons. (gen_eval_for_expr): New function. (agent_eval_command): New maintenance command. (_initialize_ax_gdb): Define the command. * remote.c (struct remote_state): New field cond_tracepoints. (PACKET_ConditionalTracepoints): New packet config type. (remote_cond_tracepoint_feature): New function. (remote_protocol_features): Add ConditionalTracepoints. (remote_supports_cond_tracepoints): New function. (_initialize_remote): Add ConditionalTracepoints. * tracepoint.c (download_tracepoint): Add conditional. * NEWS: Mention conditional tracepoints. gdb/doc/ * gdb.texinfo (Tracepoint Conditions): New section. (General Query Packets): Describe ConditionalTracepoints. (Tracepoint Packets): Describe condition field. (Maintenance Commands): Describe maint agent-eval. * agentexpr.texi (Using Agent Expressions): Mention eval usage. gdb/testsuite/ * gdb.trace/tracecmd.exp: Add basic test of tracepoint conditions.
Diffstat (limited to 'gdb/doc/agentexpr.texi')
-rw-r--r--gdb/doc/agentexpr.texi20
1 files changed, 15 insertions, 5 deletions
diff --git a/gdb/doc/agentexpr.texi b/gdb/doc/agentexpr.texi
index 1b893d5..3066319 100644
--- a/gdb/doc/agentexpr.texi
+++ b/gdb/doc/agentexpr.texi
@@ -7,13 +7,11 @@
@c This file is part of the GDB manual.
@c
-@c Copyright (C) 2003, 2004, 2005, 2006
+@c Copyright (C) 2003, 2004, 2005, 2006, 2009
@c Free Software Foundation, Inc.
@c
@c See the file gdb.texinfo for copying conditions.
-@c Revision: $Id$
-
@node Agent Expressions
@appendix The GDB Agent Expression Mechanism
@@ -473,8 +471,20 @@ address, and the top of the stack is the lvalue's size, in bytes.
@node Using Agent Expressions
@section Using Agent Expressions
-Here is a sketch of a full non-stop debugging cycle, showing how agent
-expressions fit into the process.
+Agent expressions can be used in several different ways by @value{GDBN},
+and the debugger can generate different bytecode sequences as appropriate.
+
+One possibility is to do expression evaluation on the target rather
+than the host, such as for the conditional of a conditional
+tracepoint. In such a case, @value{GDBN} compiles the source
+expression into a bytecode sequence that simply gets values from
+registers or memory, does arithmetic, and returns a result.
+
+Another way to use agent expressions is for tracepoint data
+collection. @value{GDBN} generates a different bytecode sequence for
+collection; in addition to bytecodes that do the calculation,
+@value{GDBN} adds @code{trace} bytecodes to save the pieces of
+memory that were used.
@itemize @bullet