aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-07-25 16:04:53 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-07-25 16:04:53 +0000
commit543305c9cd7417b50b1e6d1fce6c7e0e44741bf4 (patch)
tree9362b4af6cd7e359cf25eef80294b924cd8c249e /gdb/dwarf2loc.c
parentc0a91b2b1432c7ecd7dfb558f9c37b6798b234d0 (diff)
downloadgdb-543305c9cd7417b50b1e6d1fce6c7e0e44741bf4.zip
gdb-543305c9cd7417b50b1e6d1fce6c7e0e44741bf4.tar.gz
gdb-543305c9cd7417b50b1e6d1fce6c7e0e44741bf4.tar.bz2
gdb/
Fix implicit pointer offsets. * dwarf2loc.c (indirect_pieced_value): Comment byte_offset. Use also ptr.OFFSET. gdb/testsuite/ Fix implicit pointer offsets. * gdb.dwarf2/implptr.c (add): New marker baz breakpoint. * gdb.dwarf2/implptr.exp (set baz breakpoint for implptr) (continue to breakpoint: continue to baz breakpoint for implptr) (sanity check element 0, sanity check element 1) (enter the inlined function, check element 0 for the offset) (check element 1 for the offset) (continue to breakpoint: ignore the second baz breakpoint): New tests. (set foo breakpoint for implptr): Update the breakpoint number.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index c29a07c..8ecc688 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -1012,6 +1012,8 @@ indirect_pieced_value (struct value *value)
}
frame = get_selected_frame (_("No frame selected."));
+
+ /* This is an offset requested by GDB, such as value subcripts. */
byte_offset = value_as_address (value);
gdb_assert (piece);
@@ -1023,7 +1025,7 @@ indirect_pieced_value (struct value *value)
result = dwarf2_evaluate_loc_desc_full (TYPE_TARGET_TYPE (type), frame,
baton.data, baton.size, baton.per_cu,
- byte_offset);
+ piece->v.ptr.offset + byte_offset);
do_cleanups (back_to);