* dwarf2expr.c (execute_stack_op): Handle DW_OP_GNU_entry_value.  New
	label abort_expression.
	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Handle
	DWARF_VALUE_OPTIMIZED_OUT.

gdb/testsuite/
	* gdb.dwarf2/dw2-entry-value-main.c: New file.
	* gdb.dwarf2/dw2-entry-value.S: New file.
	* gdb.dwarf2/dw2-entry-value.exp: New file.
This commit is contained in:
Jan Kratochvil 2011-03-22 21:06:34 +00:00
parent dc80f6ae78
commit dd90784ccd
7 changed files with 200 additions and 1 deletions

View file

@ -904,6 +904,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
op_ptr += 4;
ctx->dwarf_call (ctx, result);
goto no_push;
case DW_OP_GNU_entry_value:
/* This operation is not yet supported by GDB. */
ctx->location = DWARF_VALUE_OPTIMIZED_OUT;
ctx->stack_len = 0;
ctx->num_pieces = 0;
goto abort_expression;
default:
error (_("Unhandled dwarf expression opcode 0x%x"), op);
@ -921,6 +928,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
if (ctx->location == DWARF_VALUE_IMPLICIT_POINTER)
add_piece (ctx, 8 * ctx->addr_size, 0);
abort_expression:
ctx->recursion_depth--;
gdb_assert (ctx->recursion_depth >= 0);
#undef sign_ext