From 49f6c8397d2fc0daf0bad3b832388a36feceb6c6 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 19 Jun 2012 00:37:18 +0000 Subject: * dwarf2expr.c (execute_stack_op): Handle DW_OP_GNU_const_index. Adjust address for DW_OP_GNU_addr_index. * dwarf2expr.h (dwarf_expr_context): Update comment. * dwarf2loc.c (locexpr_describe_location_piece): New arg per_cu, all callers updated. Handle TLS vars described with DW_OP_GNU_const_index. (disassemble_dwarf_expression): Handle DW_OP_GNU_addr_index and DW_OP_GNU_const_index. * dwarf2read.c (decode_locdesc): Handle DW_OP_GNU_addr_index. --- gdb/dwarf2expr.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/dwarf2expr.c') diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c index 40ce608..214b371 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -727,6 +727,12 @@ execute_stack_op (struct dwarf_expr_context *ctx, case DW_OP_GNU_addr_index: op_ptr = safe_read_uleb128 (op_ptr, op_end, &uoffset); result = (ctx->funcs->get_addr_index) (ctx->baton, uoffset); + result += ctx->offset; + result_val = value_from_ulongest (address_type, result); + break; + case DW_OP_GNU_const_index: + op_ptr = safe_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; -- cgit v1.1