diff options
Diffstat (limited to 'gdb/doc/agentexpr.texi')
-rw-r--r-- | gdb/doc/agentexpr.texi | 20 |
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 |