/* varobj support for Ada.
- Copyright (C) 2012-2018 Free Software Foundation, Inc.
+ Copyright (C) 2012-2019 Free Software Foundation, Inc.
This file is part of GDB.
/* A typedef to an array descriptor in fact represents a pointer
to an unconstrained array. These types always have one child
(the unconstrained array). */
- if (ada_is_array_descriptor_type (parent_type)
- && TYPE_CODE (parent_type) == TYPE_CODE_TYPEDEF)
+ if (ada_is_access_to_unconstrained_array (parent_type))
return 1;
if (TYPE_CODE (parent_type) == TYPE_CODE_ARRAY)
if (child_path_expr)
*child_path_expr = std::string ();
- if (ada_is_array_descriptor_type (parent_type)
- && TYPE_CODE (parent_type) == TYPE_CODE_TYPEDEF)
+ if (ada_is_access_to_unconstrained_array (parent_type))
{
ada_varobj_describe_ptr_child (parent_value, parent_type,
parent_name, parent_path_expr,
struct type *type = (var->value != nullptr
? value_type (var->value.get ()) : var->type);
- if (ada_is_array_descriptor_type (type)
- && TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
+ 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.
its value is changeable. */