aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
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);