aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-10 17:17:29 +0000
committerTom Tromey <tromey@redhat.com>2012-12-10 17:17:29 +0000
commit8b9737bf8cca3d3f999bb48a27019933f2138c2c (patch)
treebaeba3860356f90c0986f90733137348d482e61c /gdb/dwarf2loc.c
parent93eed41f8ee40080a4e5f21fe7e950e5f34534ae (diff)
downloadgdb-8b9737bf8cca3d3f999bb48a27019933f2138c2c.zip
gdb-8b9737bf8cca3d3f999bb48a27019933f2138c2c.tar.gz
gdb-8b9737bf8cca3d3f999bb48a27019933f2138c2c.tar.bz2
* 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) <len, data>: Update comment. (struct dwarf_expr_piece) <v.ptr.die>: Now a sect_offset. * dwarf2expr.c (add_piece): Update. (execute_stack_op) <DW_OP_GNU_implicit_pointer>: 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.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 0f8e9af..0a5200a 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -429,8 +429,7 @@ per_cu_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset,
{
struct dwarf2_locexpr_baton block;
- block = dwarf2_fetch_die_location_block (die_offset, per_cu,
- get_frame_pc, baton);
+ block = dwarf2_fetch_die_loc_cu_off (die_offset, per_cu, get_frame_pc, baton);
/* DW_OP_call_ref is currently not supported. */
gdb_assert (block.per_cu == per_cu);
@@ -2038,9 +2037,10 @@ indirect_pieced_value (struct value *value)
byte_offset = value_as_address (value);
gdb_assert (piece);
- baton = dwarf2_fetch_die_location_block (piece->v.ptr.die, c->per_cu,
- get_frame_address_in_block_wrapper,
- frame);
+ baton
+ = dwarf2_fetch_die_loc_sect_off (piece->v.ptr.die, c->per_cu,
+ get_frame_address_in_block_wrapper,
+ frame);
return dwarf2_evaluate_loc_desc_full (TYPE_TARGET_TYPE (type), frame,
baton.data, baton.size, baton.per_cu,
@@ -3205,8 +3205,8 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
op_ptr += size;
offset.cu_off = uoffset;
- block = dwarf2_fetch_die_location_block (offset, per_cu,
- get_ax_pc, expr);
+ block = dwarf2_fetch_die_loc_cu_off (offset, per_cu,
+ get_ax_pc, expr);
/* DW_OP_call_ref is currently not supported. */
gdb_assert (block.per_cu == per_cu);