diff options
Diffstat (limited to 'gdb/p-valprint.c')
-rw-r--r-- | gdb/p-valprint.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index d2efa5b..e55b122 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -272,10 +272,19 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, { if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF) { - struct value *deref_val = - value_at - (TYPE_TARGET_TYPE (type), - unpack_pointer (type, valaddr + embedded_offset)); + struct value *deref_val; + + deref_val = coerce_ref_if_computed (original_value); + if (deref_val != NULL) + { + /* More complicated computed references are not supported. */ + gdb_assert (embedded_offset == 0); + } + else + deref_val = value_at (TYPE_TARGET_TYPE (type), + unpack_pointer (type, + (valaddr + + embedded_offset))); common_val_print (deref_val, stream, recurse + 1, options, current_language); |