diff options
author | xgsa <xgsa> | 2012-02-21 13:48:58 +0000 |
---|---|---|
committer | xgsa <xgsa> | 2012-02-21 13:48:58 +0000 |
commit | b94117c362174ff5665ec0e28915ae7a62f058eb (patch) | |
tree | 3fb217159e44b56afcc5662988c82b1c2ba9f834 /gdb/c-valprint.c | |
parent | a3141fe4a3a1910f710477482813960335cd3cd8 (diff) | |
download | gdb-b94117c362174ff5665ec0e28915ae7a62f058eb.tar.gz |
gdb/
* c-valprint.c (c_value_print): Use value_rtti_indirect_type
instead of value_rtti_target_type.
* eval.c (evaluate_subexp_standard): Use value_rtti_indirect_type
instead of value_rtti_target_type.
* typeprint.c (whatis_exp): Use value_rtti_indirect_type instead of
value_rtti_target_type.
* valops.c (value_ind): Extract function readjust_indirect_value_type.
(value_rtti_target_type): Rename to ...
(value_rtti_indirect_type): ... here and make it indirect. Update
function comment.
* value.c (readjust_indirect_value_type): New function.
(coerce_ref): Support for enclosing type setting for references
with readjust_indirect_value_type.
* value.h (readjust_value_type): New declaration.
(value_rtti_target_type): Rename to ...
(value_rtti_indirect_type): ... here.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 82551e9dc93..25c6688e89d 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -728,22 +728,13 @@ c_value_print (struct value *val, struct ui_file *stream, if (value_entirely_available (val)) { - real_type = value_rtti_target_type (val, &full, &top, &using_enc); + real_type = value_rtti_indirect_type (val, &full, &top, + &using_enc); if (real_type) { /* RTTI entry found. */ - if (TYPE_CODE (type) == TYPE_CODE_PTR) - { - /* Create a pointer type pointing to the real - type. */ - type = lookup_pointer_type (real_type); - } - else - { - /* Create a reference type referencing the real - type. */ - type = lookup_reference_type (real_type); - } + type = real_type; + /* Need to adjust pointer value. */ val = value_from_pointer (type, value_as_address (val) - top); |