From dfcee124897d3395925bdfbfded468c9c81394a0 Mon Sep 17 00:00:00 2001 From: Anton Gorenkov Date: Tue, 21 Feb 2012 13:48:59 +0000 Subject: 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. --- gdb/eval.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'gdb/eval.c') diff --git a/gdb/eval.c b/gdb/eval.c index 9913a72..de1c4bd 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -2001,16 +2001,10 @@ evaluate_subexp_standard (struct type *expect_type, if (opts.objectprint && TYPE_TARGET_TYPE(type) && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS)) { - real_type = value_rtti_target_type (arg1, &full, &top, &using_enc); + real_type = value_rtti_indirect_type (arg1, &full, &top, + &using_enc); if (real_type) - { - if (TYPE_CODE (type) == TYPE_CODE_PTR) - real_type = lookup_pointer_type (real_type); - else - real_type = lookup_reference_type (real_type); - arg1 = value_cast (real_type, arg1); - } } } -- cgit v1.1