diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-12-28 14:14:18 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-12-28 14:14:18 +0000 |
commit | 43f17405181c357d49d5193f0d16665964e6e5b0 (patch) | |
tree | 2308a13d8de3bd650f44e6e09b437599efd8f6ef /gdb/hppa-tdep.c | |
parent | 4598bfbbd66f2bbd11c1d95e7caf3f7a7a1ed432 (diff) | |
download | gdb-43f17405181c357d49d5193f0d16665964e6e5b0.tar.gz |
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/hppa-tdep.c')
-rw-r--r-- | gdb/hppa-tdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 5b6676e0c6f..7785957dff3 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1313,7 +1313,7 @@ hppa_alignof (struct type *type) case TYPE_CODE_FLT: return TYPE_LENGTH (type); case TYPE_CODE_ARRAY: - return hppa_alignof (TYPE_FIELD_TYPE (type, 0)); + return hppa_alignof (TYPE_INDEX_TYPE (type)); case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: max_align = 1; |