From 8b9737bf8cca3d3f999bb48a27019933f2138c2c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 10 Dec 2012 17:17:29 +0000 Subject: * dwarf2read.c (dwarf2_fetch_die_loc_sect_off): New function. (dwarf2_fetch_die_loc_cu_off): Rename from dwarf2_fetch_die_location_block. Rewrite to use dwarf2_fetch_die_loc_sect_off. * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Declare. (dwarf2_fetch_die_loc_cu_off): Rename. * dwarf2loc.c (indirect_pieced_value): Use dwarf2_fetch_die_loc_sect_off. * dwarf2expr.h (struct dwarf_expr_context) : Update comment. (struct dwarf_expr_piece) : Now a sect_offset. * dwarf2expr.c (add_piece): Update. (execute_stack_op) : Update comment. testsuite * gdb.dwarf2/implptr-64bit.exp: Run tests with two CUs as well. (test): Add "two_cu" argument. * gdb.dwarf2/implptr-64bit.S: Move subprogram later; use ref_addr for types; allow two CUs. --- gdb/dwarf2expr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/dwarf2expr.c') diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c index 214b371..877add4 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -342,7 +342,7 @@ add_piece (struct dwarf_expr_context *ctx, ULONGEST size, ULONGEST offset) } else if (p->location == DWARF_VALUE_IMPLICIT_POINTER) { - p->v.ptr.die.cu_off = ctx->len; + p->v.ptr.die.sect_off = ctx->len; p->v.ptr.offset = value_as_long (dwarf_expr_fetch (ctx, 0)); } else if (p->location == DWARF_VALUE_REGISTER) @@ -872,7 +872,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, error (_("DWARF-2 expression error: DW_OP_GNU_implicit_pointer " "is not allowed in frame context")); - /* The referred-to DIE of cu_offset kind. */ + /* The referred-to DIE of sect_offset kind. */ ctx->len = extract_unsigned_integer (op_ptr, ctx->ref_addr_size, byte_order); op_ptr += ctx->ref_addr_size; -- cgit v1.1