diff options
author | Tom Tromey <tromey@redhat.com> | 2011-02-18 20:55:45 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-02-18 20:55:45 +0000 |
commit | c7f96d2b95d916a17453df2df3bff1b382420bc8 (patch) | |
tree | 3d92959b148d78f2ca28eb68ce00316d56c8f98a /gdb/ax-general.c | |
parent | 66694b75a4d54ce3228aab59ac09585f576dcc16 (diff) | |
download | gdb-c7f96d2b95d916a17453df2df3bff1b382420bc8.zip gdb-c7f96d2b95d916a17453df2df3bff1b382420bc8.tar.gz gdb-c7f96d2b95d916a17453df2df3bff1b382420bc8.tar.bz2 |
gdb
* ax-general.c (aop_map): Add pick and rot.
* dwarf2loc.c (compile_dwarf_to_ax) <DW_OP_over>: Reimplement.
<DW_OP_rot>: Implement.
* ax.h (enum agent_op) <aop_pick, aop_rot>: 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) <gdb_agent_op_pick,
gdb_agent_op_rot>: New constants.
(gdb_agent_op_names): Add pick and roll.
(eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
cases.
Diffstat (limited to 'gdb/ax-general.c')
-rw-r--r-- | gdb/ax-general.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/ax-general.c b/gdb/ax-general.c index 71d23f1..8d95855 100644 --- a/gdb/ax-general.c +++ b/gdb/ax-general.c @@ -143,6 +143,17 @@ ax_simple (struct agent_expr *x, enum agent_op op) x->buf[x->len++] = op; } +/* Append a pick operator to EXPR. DEPTH is the stack item to pick, + with 0 being top of stack. */ +void +ax_pick (struct agent_expr *x, int depth) +{ + if (depth < 0 || depth > 255) + error (_("GDB bug: ax-general.c (ax_pick): stack depth out of range")); + ax_simple (x, aop_pick); + append_const (x, 1, depth); +} + /* Append a sign-extension or zero-extension instruction to EXPR, to extend an N-bit value. */ @@ -376,6 +387,9 @@ struct aop_map aop_map[] = {"tracev", 2, 0, 0, 1}, /* 0x2e */ {0, 0, 0, 0, 0}, /* 0x2f */ {"trace16", 2, 0, 1, 1}, /* 0x30 */ + {0, 0, 0, 0, 0}, /* 0x31 */ + {"pick", 1, 0, 0, 1}, /* 0x32 */ + {"rot", 0, 0, 3, 3}, /* 0x33 */ }; |