aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/agentexpr.texi
diff options
context:
space:
mode:
authorDavid Taylor <dtaylor@emc.com>2015-02-19 18:53:50 +0400
committerJoel Brobecker <brobecker@adacore.com>2015-02-19 19:04:16 +0400
commit53cf2ee0d933ac4d95530555854a6f8d3cefc2e8 (patch)
tree6675fa7a6e80593c702dd71ef8a9ae943863b030 /gdb/doc/agentexpr.texi
parentdb95bb7c5946a109e1584ab2c43c052ff39e63bd (diff)
downloadgdb-53cf2ee0d933ac4d95530555854a6f8d3cefc2e8.zip
gdb-53cf2ee0d933ac4d95530555854a6f8d3cefc2e8.tar.gz
gdb-53cf2ee0d933ac4d95530555854a6f8d3cefc2e8.tar.bz2
[gdb/ax] small "setv" fix and documentation's adjustment.
gdb/doc/agentexpr.texi documents the "setv" opcode as follow: @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}. The @item line is incorrect (and does not match with its description), so this patch fixes it. Additionally, in gdb/common/ax.def we find the line: DEFOP (setv, 2, 0, 0, 1, 0x2d) From the comment earlier in the file: Each line is of the form: DEFOP (name, size, data_size, consumed, produced, opcode) [...] CONSUMED is the number of stack elements consumed. PRODUCED is the number of stack elements produced. which is saying that nothing is consumed and one item is produced. Both should be 0 or both should be 1. This patch sets them both to 1, which seems better since if nothing is on the stack an error will occur. gdb/ChangeLog: * common/ax.def (setv): Fix consumed entry in setv DEFOP. gdb/doc/ChangeLog: * agentexpr.texi (Bytecode Descriptions): Fix summary line for setv. Tested on x86_64-linux.
Diffstat (limited to 'gdb/doc/agentexpr.texi')
-rw-r--r--gdb/doc/agentexpr.texi2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/doc/agentexpr.texi b/gdb/doc/agentexpr.texi
index 788de1c..297cd5e 100644
--- a/gdb/doc/agentexpr.texi
+++ b/gdb/doc/agentexpr.texi
@@ -461,7 +461,7 @@ 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}
+@item @code{setv} (0x2d) @var{n}: @var{v} @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