[gdb/ax] small "setv" fix and documentation's adjustment.
authorDavid Taylor <dtaylor@emc.com>
Thu, 19 Feb 2015 14:53:50 +0000 (18:53 +0400)
committerJoel Brobecker <brobecker@adacore.com>
Thu, 19 Feb 2015 15:04:16 +0000 (19:04 +0400)
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.

gdb/ChangeLog
gdb/common/ax.def
gdb/doc/ChangeLog
gdb/doc/agentexpr.texi

index a51e6e119b671dfb1652f4a29646d58d117af6cc..5c5b75a72ebb9823276d7d30591f29e69855124b 100644 (file)
@@ -1,3 +1,7 @@
+2015-02-19  David Taylor  <dtaylor@emc.com>
+
+       * common/ax.def (setv): Fix consumed entry in setv DEFOP.
+
 2015-02-18  Patrick Palka  <patrick@parcs.ath.cx>
 
        * tui/tui-io.c (tui_handle_resize_during_io): Remove this
index 8b277258f761e29e86c7d915ae0ab7f19e295240..27c97cc51ed55306b565ce080111214972354814 100644 (file)
@@ -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)
index 576a47bb458fffd3ac7f4f7240727c41fa15d3e3..f7030506c9f013b18d924c80a47e352303194852 100644 (file)
@@ -1,3 +1,7 @@
+2015-02-19  David Taylor  <dtaylor@emc.com>
+
+       * agentexpr.texi (Bytecode Descriptions): Fix summary line for setv.
+
 2015-02-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
        * gdb.texinfo (Static Probe Points): Add cindex `static probe
index 788de1c6a58922ae355d0fda13feafe84750d0bc..297cd5e687f4329db48b30fb743dc7239ddd3350 100644 (file)
@@ -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
This page took 0.036919 seconds and 4 git commands to generate.