* 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.
This commit is contained in:
Tom Tromey
2011-02-18 20:55:45 +00:00
parent 66694b75a4
commit c7f96d2b95
8 changed files with 76 additions and 23 deletions

View File

@@ -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: