forked from Imagelibrary/binutils-gdb
* 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:
10
gdb/value.c
10
gdb/value.c
@@ -290,13 +290,9 @@ allocate_repeat_value (struct type *type, int count)
|
||||
int low_bound = current_language->string_lower_bound; /* ??? */
|
||||
/* FIXME-type-allocation: need a way to free this type when we are
|
||||
done with it. */
|
||||
struct type *range_type
|
||||
= create_range_type ((struct type *) NULL, builtin_type_int32,
|
||||
low_bound, count + low_bound - 1);
|
||||
/* FIXME-type-allocation: need a way to free this type when we are
|
||||
done with it. */
|
||||
return allocate_value (create_array_type ((struct type *) NULL,
|
||||
type, range_type));
|
||||
struct type *array_type
|
||||
= lookup_array_range_type (type, low_bound, count + low_bound - 1);
|
||||
return allocate_value (array_type);
|
||||
}
|
||||
|
||||
/* Needed if another module needs to maintain its on list of values. */
|
||||
|
||||
Reference in New Issue
Block a user