diff options
author | Stan Shebs <shebs@codesourcery.com> | 2009-12-28 23:39:10 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2009-12-28 23:39:10 +0000 |
commit | f61e138d9a5c10da22c01ef377034e66e6978fe6 (patch) | |
tree | 399c49505e3d1aa2e3f71937bd6f1034cf5c6acc /gdb/doc/agentexpr.texi | |
parent | ae77ee9a7fe8e4b4e05bd65b4f9f2b8ca63a129d (diff) | |
download | gdb-f61e138d9a5c10da22c01ef377034e66e6978fe6.zip gdb-f61e138d9a5c10da22c01ef377034e66e6978fe6.tar.gz gdb-f61e138d9a5c10da22c01ef377034e66e6978fe6.tar.bz2 |
2009-12-28 Stan Shebs <stan@codesourcery.com>
Add trace state variables.
* ax.h (enum agent_op): Add getv, setv, and tracev.
(ax_tsv): Declare.
* ax-gdb.c: Include tracepoint.h.
(gen_expr): Handle BINOP_ASSIGN, BINOP_ASSIGN_MODIFY, and
OP_INTERNALVAR.
(gen_expr_binop_rest): New function, split from gen_expr.
* ax-general.c (ax_tsv): New function.
(aop_map): Add new bytecodes.
* tracepoint.h (struct trace_state_variable): New struct.
(tsv_s): New typedef.
(find_trace_state_variable): Declare.
* tracepoint.c (tvariables): New global.
(next_tsv_number): New global.
(create_trace_state_variable): New function.
(find_trace_state_variable): New function.
(delete_trace_state_variable): New function.
(trace_variable_command): New function.
(delete_trace_variable_command): New function.
(tvariables_info): New function.
(trace_start_command): Download tsvs with initial values.
(_initialize_tracepoint): Add new commands.
* NEWS: Mention the addition of trace state variables.
==> doc/ChangeLog <==
2009-12-28 Stan Shebs <stan@codesourcery.com>
* gdb.texinfo (Trace State Variables): New section.
(Tracepoint Packets): Describe trace state variable packets.
* agentexpr.texi (Bytecode Descriptions): Describe trace state
variable bytecodes.
==> testsuite/ChangeLog <==
2009-12-28 Stan Shebs <stan@codesourcery.com>
* gdb.trace/tsv.exp: New file.
* gdb.base/completion.exp: Update ambiguous info output.
Diffstat (limited to 'gdb/doc/agentexpr.texi')
-rw-r--r-- | gdb/doc/agentexpr.texi | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/doc/agentexpr.texi b/gdb/doc/agentexpr.texi index e3d171d..37c65f8 100644 --- a/gdb/doc/agentexpr.texi +++ b/gdb/doc/agentexpr.texi @@ -440,6 +440,24 @@ alignment within the bytecode stream; thus, on machines where fetching a 16-bit on an unaligned address raises an exception, you should fetch the register number one byte at a time. +@item @code{getv} (0x2c) @var{n}: @result{} @var{v} +Push the value of trace state variable number @var{n}, without sign +extension. + +The variable number @var{n} is encoded as a 16-bit unsigned integer +immediately following the @code{getv} bytecode. It is always stored most +significant byte first, regardless of the target's normal endianness. +The variable number is not guaranteed to fall at any particular +alignment within the bytecode stream; thus, on machines where fetching a +16-bit on an unaligned address raises an exception, you should fetch the +register number one byte at a time. + +@item @code{setv} (0x2d) @var{n}: @result{} @var{v} +Set trace state variable number @var{n} to the value found on the top +of the stack. The stack is unchanged, so that the value is readily +available if the assignment is part of a larger expression. The +handling of @var{n} is as described for @code{getv}. + @item @code{trace} (0x0c): @var{addr} @var{size} @result{} Record the contents of the @var{size} bytes at @var{addr} in a trace buffer, for later retrieval by GDB. @@ -457,6 +475,10 @@ Identical to trace_quick, except that @var{size} is a 16-bit big-endian unsigned integer, not a single byte. This should probably have been named @code{trace_quick16}, for consistency. +@item @code{tracev} (0x2e) @var{n}: @result{} @var{a} +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{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 |