mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-18 21:34:13 +08:00
2008-12-15 Tristan Gingold <gingold@adacore.com>
* dwarf2expr.c (execute_stack_op): Handle DW_OP_swap.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2008-12-15 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
|
* dwarf2expr.c (execute_stack_op): Handle DW_OP_swap.
|
||||||
|
|
||||||
2008-12-15 Jerome Guitton <guitton@adacore.com>
|
2008-12-15 Jerome Guitton <guitton@adacore.com>
|
||||||
|
|
||||||
* ada-lang.c (ada_value_slice_ptr): Rename to...
|
* ada-lang.c (ada_value_slice_ptr): Rename to...
|
||||||
|
@ -514,6 +514,20 @@ execute_stack_op (struct dwarf_expr_context *ctx,
|
|||||||
offset = *op_ptr++;
|
offset = *op_ptr++;
|
||||||
result = dwarf_expr_fetch (ctx, offset);
|
result = dwarf_expr_fetch (ctx, offset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DW_OP_swap:
|
||||||
|
{
|
||||||
|
CORE_ADDR t1, t2;
|
||||||
|
|
||||||
|
if (ctx->stack_len < 2)
|
||||||
|
error (_("Not enough elements for DW_OP_swap. Need 2, have %d."),
|
||||||
|
ctx->stack_len);
|
||||||
|
t1 = ctx->stack[ctx->stack_len - 1];
|
||||||
|
t2 = ctx->stack[ctx->stack_len - 2];
|
||||||
|
ctx->stack[ctx->stack_len - 1] = t2;
|
||||||
|
ctx->stack[ctx->stack_len - 2] = t1;
|
||||||
|
goto no_push;
|
||||||
|
}
|
||||||
|
|
||||||
case DW_OP_over:
|
case DW_OP_over:
|
||||||
result = dwarf_expr_fetch (ctx, 1);
|
result = dwarf_expr_fetch (ctx, 1);
|
||||||
|
Reference in New Issue
Block a user