aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-12-15 02:52:11 +0000
committerFred Fish <fnf@specifix.com>1992-12-15 02:52:11 +0000
commit85f0a8484fae7fc4f28b85298253e786645a5b6a (patch)
tree723472495b0c8155f5eb698d4bbb08cb935ebc69 /gdb/c-exp.y
parent7f70a2756406d76578fc4a6af98c42fd85f28b12 (diff)
downloadgdb-85f0a8484fae7fc4f28b85298253e786645a5b6a.zip
gdb-85f0a8484fae7fc4f28b85298253e786645a5b6a.tar.gz
gdb-85f0a8484fae7fc4f28b85298253e786645a5b6a.tar.bz2
* gdbtypes.c (create_array_type): Complete rewrite. Now requires
a optional type to decorate as an array type, the type of the index, and the bounds of the array. Records this additional info in the array type for use with languages with nonzero array bounds. * gdbtypes.h (enum type_code): Update comment for TYPE_CODE_ARRAY to note that arrays may have bounds. * gdbtypes.h (create_array_type): Update prototype. * c-exp.y (ptype production): Adjust for new create_array_type calling conventions. * coffread.c (decode_type): Call create_array_type rather than handcrafting array types. * convex-tdep.c (value_type): Remove, now use create_array_type. * convex-tdep.c (value_of_trapped_internalvar): Convert calls to vector_type into calls to create_array_type. * dwarfread.c (decode_subscr_data): Name changed to decode_subscript_data_item throughout. * dwarfread.c (decode_subscript_data_item): Rewrite to use create_array_type. Now records index type and range as well. * dwarfread.c (dwarf_read_array_type): Rewrite as part of change to use create_array_type. * dwarfread.c (read_subroutine_type): Test existing user defined types before decorating them, to ensure they are blank, and complain about it if they are not. * dwarfread.c (decode_fund_type): For unrecognized types, always return some valid type (type integer). If the unrecognized type cannot be an implementation defined type, complain as well. * m88k-tdep.c (pushed_size): Update comment for TYPE_CODE_ARRAY. * m88k-tdep.c (store_param): Update comment for TYPE_CODE_ARRAY. * mipsread.c (upgrade_type): Add FIXME comment that code to handcraft arrays should be replaced with call to create_array_type. * stabsread.c (read_array_type): Replace code to handcraft array types with call to create_array_type. * valprint.c (type_print_varspec_prefix): Minor formatting change, join lines that don't need to be split.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r--gdb/c-exp.y6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 5274118..8273f6a 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -721,8 +721,10 @@ ptype : typebase
case tp_array:
array_size = pop_type_int ();
if (array_size != -1)
- follow_type = create_array_type (follow_type,
- array_size);
+ follow_type =
+ create_array_type ((struct type *) NULL,
+ follow_type, builtin_type_int,
+ 0, array_size - 1);
else
follow_type = lookup_pointer_type (follow_type);
break;