public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* two agent expression nits (one line each)
@ 2014-09-11 17:54 David Taylor
  2014-11-23  3:27 ` Joel Brobecker
  2014-12-02 20:45 ` Stan Shebs
  0 siblings, 2 replies; 11+ messages in thread
From: David Taylor @ 2014-09-11 17:54 UTC (permalink / raw)
  To: gdb-patches

In gdb/doc/agentexpr.texi you''ll find the text:

    @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 and the following text do no agree with one another.  I'm
guessing that the text is correct, in which case this line:

    @item @code{setv} (0x2d) @var{n}: @result{} @var{v}

should be changed to this:

    @item @code{setv} (0x2d) @var{n}: @var{v} @result{} @var{v}

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.  Setting them both to 1 seems better
since if nothing is on the stack an error will occur.  So, it should be
changed to:

    DEFOP (setv, 2, 0, 1, 1, 0x2d)

David

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-02-20  3:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 17:54 two agent expression nits (one line each) David Taylor
2014-11-23  3:27 ` Joel Brobecker
2014-12-02 20:45 ` Stan Shebs
2014-12-13 13:44   ` Joel Brobecker
2014-12-15 15:41     ` David Taylor
2014-12-20 17:19       ` Joel Brobecker
2015-02-03 21:58         ` David Taylor
2015-02-11  7:49           ` Joel Brobecker
2015-02-11 17:28           ` Stan Shebs
2015-02-13 19:21             ` David Taylor
2015-02-20  3:05               ` pushed (master+branch): " Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).