aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-02-18 20:55:45 +0000
committerTom Tromey <tromey@redhat.com>2011-02-18 20:55:45 +0000
commitc7f96d2b95d916a17453df2df3bff1b382420bc8 (patch)
tree3d92959b148d78f2ca28eb68ce00316d56c8f98a /gdb/dwarf2loc.c
parent66694b75a4d54ce3228aab59ac09585f576dcc16 (diff)
downloadgdb-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/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 4d31afa..a439f72 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -1740,7 +1740,7 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
case DW_OP_pick:
offset = *op_ptr++;
- unimplemented (op);
+ ax_pick (expr, offset);
break;
case DW_OP_swap:
@@ -1748,31 +1748,11 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
break;
case DW_OP_over:
- /* We can't directly support DW_OP_over, but GCC emits it as
- part of a sequence to implement signed modulus. As a
- hack, we recognize this sequence. Note that if GCC ever
- generates a branch to the middle of this sequence, then
- we will die somehow. */
- if (op_end - op_ptr >= 4
- && op_ptr[0] == DW_OP_over
- && op_ptr[1] == DW_OP_div
- && op_ptr[2] == DW_OP_mul
- && op_ptr[3] == DW_OP_minus)
- {
- /* Sign extend the operands. */
- ax_ext (expr, addr_size_bits);
- ax_simple (expr, aop_swap);
- ax_ext (expr, addr_size_bits);
- ax_simple (expr, aop_swap);
- ax_simple (expr, aop_rem_signed);
- op_ptr += 4;
- }
- else
- unimplemented (op);
+ ax_pick (expr, 1);
break;
case DW_OP_rot:
- unimplemented (op);
+ ax_simple (expr, aop_rot);
break;
case DW_OP_deref: