From c7f96d2b95d916a17453df2df3bff1b382420bc8 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 18 Feb 2011 20:55:45 +0000 Subject: gdb * ax-general.c (aop_map): Add pick and rot. * dwarf2loc.c (compile_dwarf_to_ax) : Reimplement. : Implement. * ax.h (enum agent_op) : New constants. (ax_pick): Declare. * ax-general.c (ax_pick): New function. doc * agentexpr.texi (Bytecode Descriptions): Document pick and rot. gdbserver * tracepoint.c (enum gdb_agent_op) : New constants. (gdb_agent_op_names): Add pick and roll. (eval_agent_expr) : New cases. --- gdb/doc/ChangeLog | 4 ++++ gdb/doc/agentexpr.texi | 10 ++++++++++ 2 files changed, 14 insertions(+) (limited to 'gdb/doc') diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index ca8f3bb725a..58f2814a0d1 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2011-02-18 Tom Tromey + + * agentexpr.texi (Bytecode Descriptions): Document pick and rot. + 2011-02-14 Michael Snyder * gdb.texinfo (threads): Document argument for "info threads" cmd. diff --git a/gdb/doc/agentexpr.texi b/gdb/doc/agentexpr.texi index 7b3fe5aeeec..f2d51b74053 100644 --- a/gdb/doc/agentexpr.texi +++ b/gdb/doc/agentexpr.texi @@ -391,6 +391,16 @@ Exchange the top two items on the stack. @item @code{pop} (0x29): @var{a} => Discard the top value on the stack. +@item @code{pick} (0x32) @var{n}: @var{a} @dots{} @var{b} => @var{a} @dots{} @var{b} @var{a} +Duplicate an item from the stack and push it on the top of the stack. +@var{n}, a single byte, indicates the stack item to copy. If @var{n} +is zero, this is the same as @code{dup}; if @var{n} is one, it copies +the item under the top item, etc. If @var{n} exceeds the number of +items on the stack, terminate with an error. + +@item @code{rot} (0x33): @var{a} @var{b} @var{c} => @var{c} @var{b} @var{a} +Rotate the top three items on the stack. + @item @code{if_goto} (0x20) @var{offset}: @var{a} @result{} Pop an integer off the stack; if it is non-zero, branch to the given offset in the bytecode string. Otherwise, continue to the next -- cgit v1.2.1