X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fada-varobj.c;h=1a5d0ac2393909cb084cb5bef82292c0fe8ebab9;hb=28ce7b07473c33f2e4e380a861973d68ffe8017f;hp=3b339e00813d15fcd70047de533bbaa68ebf71d4;hpb=42a4f53d2bf8938c2aeda9f52be7a20534b214a9;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/ada-varobj.c b/gdb/ada-varobj.c index 3b339e0081..1a5d0ac239 100644 --- a/gdb/ada-varobj.c +++ b/gdb/ada-varobj.c @@ -624,6 +624,7 @@ ada_varobj_describe_simple_array_child (struct value *parent_value, of the array index type when such type qualification is needed. */ const char *index_type_name = NULL; + std::string decoded; /* If the index type is a range type, find the base type. */ while (TYPE_CODE (index_type) == TYPE_CODE_RANGE) @@ -634,7 +635,10 @@ ada_varobj_describe_simple_array_child (struct value *parent_value, { index_type_name = ada_type_name (index_type); if (index_type_name) - index_type_name = ada_decode (index_type_name); + { + decoded = ada_decode (index_type_name); + index_type_name = decoded.c_str (); + } } if (index_type_name != NULL) @@ -935,6 +939,9 @@ ada_value_is_changeable_p (const struct varobj *var) struct type *type = (var->value != nullptr ? value_type (var->value.get ()) : var->type); + if (TYPE_CODE (type) == TYPE_CODE_REF) + type = TYPE_TARGET_TYPE (type); + if (ada_is_access_to_unconstrained_array (type)) { /* This is in reality a pointer to an unconstrained array.