&& desc_arity (desc_bounds_type (type)) > 0);
}
-/* Non-zero iff type is a partially mal-formed GNAT array
- descriptor. FIXME: This is to compensate for some problems with
- debugging output from GNAT. Re-examine periodically to see if it
- is still needed. */
-
-int
-ada_is_bogus_array_descriptor (struct type *type)
-{
- return
- type != NULL
- && type->code () == TYPE_CODE_STRUCT
- && (lookup_struct_elt_type (type, "P_BOUNDS", 1) != NULL
- || lookup_struct_elt_type (type, "P_ARRAY", 1) != NULL)
- && !ada_is_array_descriptor_type (type);
-}
-
-
/* If ARR has a record type in the form of a standard GNAT array descriptor,
(fat pointer) returns the type of the array data described---specifically,
a pointer-to-array type. If BOUNDS is non-zero, the bounds data are filled
extern int ada_is_array_descriptor_type (struct type *);
-extern int ada_is_bogus_array_descriptor (struct type *);
-
extern LONGEST ada_discrete_type_low_bound (struct type *);
extern LONGEST ada_discrete_type_high_bound (struct type *);
case TYPE_CODE_STRUCT:
if (ada_is_array_descriptor_type (type))
print_array_type (type, stream, show, level, flags);
- else if (ada_is_bogus_array_descriptor (type))
- gdb_printf (stream,
- _("array (?) of ? (<mal-formed descriptor>)"));
else
print_record_type (type, stream, show, level, flags);
break;
int recurse,
const struct value_print_options *options)
{
- if (ada_is_bogus_array_descriptor (value->type ()))
- {
- gdb_printf (stream, "(...?)");
- return;
- }
-
gdb_printf (stream, "(");
if (print_field_values (value, value, stream, recurse, options,
gdb_printf (stream, ") ");
}
}
- else if (ada_is_bogus_array_descriptor (type))
- {
- gdb_printf (stream, "(");
- type_print (type, "", stream, -1);
- gdb_printf (stream, ") (...?)");
- return;
- }
opts = *options;
opts.deref_ref = true;