diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-12-28 14:14:19 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-12-28 14:14:19 +0000 |
commit | 262452ec451590e24be1f034f4fe7fad92eefa9a (patch) | |
tree | 0cf63a1f4f72343c4a185309e05ea66daf4dfdef /gdb/mdebugread.c | |
parent | 240ab0d8f5854feb6b7043487c57e31fa1ba9dbb (diff) | |
download | gdb-262452ec451590e24be1f034f4fe7fad92eefa9a.zip gdb-262452ec451590e24be1f034f4fe7fad92eefa9a.tar.gz gdb-262452ec451590e24be1f034f4fe7fad92eefa9a.tar.bz2 |
Fix TYPE_HIGH_BOUND for TYPE_CODE_RANGE using arbitrary TYPE_NFIELDS in
preparation for supporting DW_AT_byte_stride.
* ada-lang.c (packed_array_type, ada_index_type): Use TYPE_INDEX_TYPE.
(ada_array_bound_from_type): Move `index_type' declaration to the
function start. New variable `retval'. Return the bounds for
TYPE_CODE_RANGE using TYPE_LOW_BOUND and TYPE_HIGH_BOUND. Abort on
invalid index type codes.
* ada-typeprint.c (print_range): Set `upper_bound' for TYPE_CODE_RANGE
now using TYPE_HIGH_BOUND.
* ada-valprint.c (val_print_packed_array_elements): Use `index_type'.
* eval.c (evaluate_subexp_standard): Use TYPE_INDEX_TYPE.
* gdbtypes.c (create_range_type): Use TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
refer to the number of fields only through TYPE_NFIELDS.
(create_array_type): Use TYPE_INDEX_TYPE.
(check_typedef): Use TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_HIGH_BOUND.
* gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED)
(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Use TYPE_INDEX_TYPE.
(TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): Use
TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
* hppa-tdep.c (hppa_alignof <TYPE_CODE_ARRAY>): Use TYPE_INDEX_TYPE.
* mdebugread.c (parse_type): Use TYPE_LOW_BOUND, TYPE_HIGH_BOUND,
* valarith.c (value_bit_index): Use TYPE_INDEX_TYPE.
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r-- | gdb/mdebugread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 3fa06e5..054a839 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -1644,11 +1644,11 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs, TYPE_ALLOC (tp, 2 * sizeof (struct field))); TYPE_FIELD_NAME (tp, 0) = obsavestring ("Low", strlen ("Low"), ¤t_objfile->objfile_obstack); - TYPE_FIELD_BITPOS (tp, 0) = AUX_GET_DNLOW (bigend, ax); + TYPE_LOW_BOUND (tp) = AUX_GET_DNLOW (bigend, ax); ax++; TYPE_FIELD_NAME (tp, 1) = obsavestring ("High", strlen ("High"), ¤t_objfile->objfile_obstack); - TYPE_FIELD_BITPOS (tp, 1) = AUX_GET_DNHIGH (bigend, ax); + TYPE_HIGH_BOUND (tp) = AUX_GET_DNHIGH (bigend, ax); ax++; } |