aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2expr.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-06-19 00:37:18 +0000
committerDoug Evans <dje@google.com>2012-06-19 00:37:18 +0000
commit49f6c8397d2fc0daf0bad3b832388a36feceb6c6 (patch)
tree3a2562a1df6c714b92441fec04346091a7b0f7ca /gdb/dwarf2expr.c
parente48f889115297c38fc5bec3a237d5f8855e65369 (diff)
* 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.
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r--gdb/dwarf2expr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 40ce608731..214b371e56 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;