summaryrefslogtreecommitdiff
path: root/gdb/dwarf2expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r--gdb/dwarf2expr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 700d8cc4791..e93f6486c4d 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -732,6 +732,12 @@ execute_stack_op (struct dwarf_expr_context *ctx,
result_val = value_from_ulongest (address_type, result);
break;
+ case DW_OP_GNU_addr_index:
+ op_ptr = read_uleb128 (op_ptr, op_end, &uoffset);
+ result = (ctx->funcs->get_addr_index) (ctx->baton, uoffset);
+ result_val = value_from_ulongest (address_type, result);
+ break;
+
case DW_OP_const1u:
result = extract_unsigned_integer (op_ptr, 1, byte_order);
result_val = value_from_ulongest (address_type, result);
@@ -1543,6 +1549,14 @@ ctx_no_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
_("Support for DW_OP_GNU_entry_value is unimplemented"));
}
+/* Stub dwarf_expr_context_funcs.get_addr_index implementation. */
+
+CORE_ADDR
+ctx_no_get_addr_index (void *baton, unsigned int index)
+{
+ error (_("%s is invalid in this context"), "DW_OP_GNU_addr_index");
+}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
extern initialize_file_ftype _initialize_dwarf2expr;