Remove ancient Ada workaround

I ran across this very old code in gdb's Ada support.  After a bit of
archaeology, we couldn't determine what bug this might have been
working around.  It is no longer needed, so this patch removes it.

As this is entirely Ada-specific and was reviewed and tested at
AdaCore, I'm checking it in.
This commit is contained in:
Tom Tromey
2023-07-18 10:45:14 -06:00
parent 386d30593e
commit 83f362cf8f
4 changed files with 0 additions and 35 deletions
-17
View File
@@ -2066,23 +2066,6 @@ ada_is_array_descriptor_type (struct type *type)
&& 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
-2
View File
@@ -202,8 +202,6 @@ extern int ada_is_simple_array_type (struct type *);
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 *);
-3
View File
@@ -1065,9 +1065,6 @@ ada_print_type (struct type *type0, const char *varstring,
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;
-13
View File
@@ -844,12 +844,6 @@ ada_val_print_struct_union (struct value *value,
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,
@@ -1089,13 +1083,6 @@ ada_value_print (struct value *val0, struct ui_file *stream,
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;