aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-10-09 18:46:41 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-10-09 18:46:41 +0000
commit181cebd4f8897990b94df2d979b16911d2281657 (patch)
tree0e9cb55caaea5bd017f8dd805b3d9d9b0ac0f3d9 /gdb/dwarf2loc.c
parentc471e7909f052d386656f328b365d5ef84fd0fdb (diff)
downloadgdb-181cebd4f8897990b94df2d979b16911d2281657.zip
gdb-181cebd4f8897990b94df2d979b16911d2281657.tar.gz
gdb-181cebd4f8897990b94df2d979b16911d2281657.tar.bz2
gdb/
Fix DW_OP_GNU_implicit_pointer for DWARF32 v3+ on 64-bit arches. * dwarf2-frame.c (execute_stack_op): Initialize ctx->ref_addr_size. * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_implicit_pointer>: Use ctx->ref_addr_size. Handle its invalid value. * dwarf2expr.h (struct dwarf_expr_context): New field ref_addr_size. * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) (dwarf2_loc_desc_needs_frame): Initialize ctx->ref_addr_size. * dwarf2loc.h (dwarf2_per_cu_ref_addr_size): New declaration. * dwarf2read.c (decode_locdesc): Initialize ctx->ref_addr_size. (dwarf2_per_cu_ref_addr_size): New function. gdb/testsuite/ Fix DW_OP_GNU_implicit_pointer for DWARF32 v3+ on 64-bit arches. * gdb.dwarf2/implptr-64bit.S: New file. * gdb.dwarf2/implptr-64bit.exp: New file.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 12b4997..b0881db 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -1118,6 +1118,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
ctx->gdbarch = get_objfile_arch (objfile);
ctx->addr_size = dwarf2_per_cu_addr_size (per_cu);
+ ctx->ref_addr_size = dwarf2_per_cu_ref_addr_size (per_cu);
ctx->offset = dwarf2_per_cu_text_offset (per_cu);
ctx->baton = &baton;
ctx->funcs = &dwarf_expr_ctx_funcs;
@@ -1398,6 +1399,7 @@ dwarf2_loc_desc_needs_frame (const gdb_byte *data, unsigned short size,
ctx->gdbarch = get_objfile_arch (objfile);
ctx->addr_size = dwarf2_per_cu_addr_size (per_cu);
+ ctx->ref_addr_size = dwarf2_per_cu_ref_addr_size (per_cu);
ctx->offset = dwarf2_per_cu_text_offset (per_cu);
ctx->baton = &baton;
ctx->funcs = &needs_frame_ctx_funcs;