* gdbtypes.c (lookup_array_range_type): Add prototype.

(lookup_string_range_type): Likewise.
	* gdbtypes.c (lookup_array_range_type): New function.
	(lookup_string_range_type): Likewise.

	* ax-gdb.c (gen_repeat): Use lookup_array_range_type.
	* parse.c (follow_types): Likewise.
	* jv-lang.c (java_array_type): Likewise.
	* gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
	* mt-tdep.c (mt_register_type): Likewise.
	* sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
	* sh64-tdep.c (sh64_build_float_register_type): Likewise.
	* value.c (allocate_repeat_value): Likewise.
	* valops.c (value_array, value_cstring): Likewise.
	* valops.c (value_string): Use lookup_string_range_type.
This commit is contained in:
Ulrich Weigand
2009-07-02 12:18:46 +00:00
parent d5c831bd76
commit e3506a9f27
12 changed files with 62 additions and 62 deletions

View File

@ -1257,7 +1257,6 @@ follow_types (struct type *follow_type)
int make_volatile = 0;
int make_addr_space = 0;
int array_size;
struct type *range_type;
while (!done)
switch (pop_type ())
@ -1323,13 +1322,9 @@ follow_types (struct type *follow_type)
array_size = pop_type_int ();
/* FIXME-type-allocation: need a way to free this type when we are
done with it. */
range_type =
create_range_type ((struct type *) NULL,
builtin_type_int32, 0,
array_size >= 0 ? array_size - 1 : 0);
follow_type =
create_array_type ((struct type *) NULL,
follow_type, range_type);
lookup_array_range_type (follow_type,
0, array_size >= 0 ? array_size - 1 : 0);
if (array_size < 0)
TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (follow_type) = 1;
break;