aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDavid Taylor <dtaylor@emc.com>2015-02-19 18:53:50 +0400
committerJoel Brobecker <brobecker@adacore.com>2015-02-20 07:00:27 +0400
commit7b582627bc42922de3b75792472f5223f1910277 (patch)
tree9d036ce059a8adc6f9d7e9596ef2a2ab064255b4 /gdb
parent3b7a39661610038aad32563069b10fb2cfc55fab (diff)
downloadfsf-binutils-gdb-7b582627bc42922de3b75792472f5223f1910277.zip
fsf-binutils-gdb-7b582627bc42922de3b75792472f5223f1910277.tar.gz
fsf-binutils-gdb-7b582627bc42922de3b75792472f5223f1910277.tar.bz2
[gdb/ax] small "setv" fix and documentation's adjustment.gdb-7.9.0-release
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')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/common/ax.def2
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/agentexpr.texi2
4 files changed, 10 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ad032ba..dff7d6b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-20 David Taylor <dtaylor@emc.com>
+
+ * common/ax.def (setv): Fix consumed entry in setv DEFOP.
+
2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
PR corefiles/17808:
diff --git a/gdb/common/ax.def b/gdb/common/ax.def
index 8b27725..27c97cc 100644
--- a/gdb/common/ax.def
+++ b/gdb/common/ax.def
@@ -83,7 +83,7 @@ DEFOP (pop, 0, 0, 1, 0, 0x29)
DEFOP (zero_ext, 1, 0, 1, 1, 0x2a)
DEFOP (swap, 0, 0, 2, 2, 0x2b)
DEFOP (getv, 2, 0, 0, 1, 0x2c)
-DEFOP (setv, 2, 0, 0, 1, 0x2d)
+DEFOP (setv, 2, 0, 1, 1, 0x2d)
DEFOP (tracev, 2, 0, 0, 1, 0x2e)
DEFOP (tracenz, 0, 0, 2, 0, 0x2f)
DEFOP (trace16, 2, 0, 1, 1, 0x30)
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 4d2470a..6c4d5cf 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-20 David Taylor <dtaylor@emc.com>
+
+ * agentexpr.texi (Bytecode Descriptions): Fix summary line for setv.
+
2015-01-16 Eli Zaretskii <eliz@gnu.org>
* doc/gdb.texinfo (TUI Commands): Document the possible
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