diff options
author | Fred Fish <fnf@specifix.com> | 1992-12-08 21:47:49 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-12-08 21:47:49 +0000 |
commit | 160be0ded9bb9a7ff6287c3b7094327465085874 (patch) | |
tree | 89c48234f1ddfe92c4af89ea11839ceebc1b391d /gdb/dwarfread.c | |
parent | 38dc971becb7bd105245853a3cc95c2a2b2783b4 (diff) | |
download | gdb-160be0ded9bb9a7ff6287c3b7094327465085874.zip gdb-160be0ded9bb9a7ff6287c3b7094327465085874.tar.gz gdb-160be0ded9bb9a7ff6287c3b7094327465085874.tar.bz2 |
Changes for Amiga Unix from rhealey@ub.d.umn.edu.
* config/amix.mh (NAT_FILE): Add, set to nm-sysv4.h.
* config/amix.mh (NATDEPFILES): Add.
* config/amix.mh (XDEPFILES): Move procfs.o and fork-child.o
to NATDEPFILES.
* dwarfread.c (decode_subscr_data): Remove spurious test that
accepted only integer subscript types. We don't do anything
with the type at the moment anyway.
Diffstat (limited to 'gdb/dwarfread.c')
-rw-r--r-- | gdb/dwarfread.c | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index 1ca2cbc..df9d72d 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -1299,34 +1299,26 @@ decode_subscr_data (scan, end) typep = decode_array_element_type (scan); break; case FMT_FT_C_C: + /* Read the type of the index, but don't do anything with it. + FIXME: This is OK for C since only int's are allowed. + It might not be OK for other languages. */ fundtype = target_to_host (scan, SIZEOF_FMT_FT, GET_UNSIGNED, current_objfile); scan += SIZEOF_FMT_FT; - if (fundtype != FT_integer && fundtype != FT_signed_integer - && fundtype != FT_unsigned_integer) - { - SQUAWK (("array subscripts must be integral types, not type 0x%x", - fundtype)); - } - else + nbytes = TARGET_FT_LONG_SIZE (current_objfile); + lowbound = target_to_host (scan, nbytes, GET_UNSIGNED, current_objfile); + scan += nbytes; + highbound = target_to_host (scan, nbytes, GET_UNSIGNED, current_objfile); + scan += nbytes; + nexttype = decode_subscr_data (scan, end); + if (nexttype != NULL) { - nbytes = TARGET_FT_LONG_SIZE (current_objfile); - lowbound = target_to_host (scan, nbytes, GET_UNSIGNED, - current_objfile); - scan += nbytes; - highbound = target_to_host (scan, nbytes, GET_UNSIGNED, - current_objfile); - scan += nbytes; - nexttype = decode_subscr_data (scan, end); - if (nexttype != NULL) - { - typep = alloc_type (current_objfile); - TYPE_CODE (typep) = TYPE_CODE_ARRAY; - TYPE_LENGTH (typep) = TYPE_LENGTH (nexttype); - TYPE_LENGTH (typep) *= (highbound - lowbound) + 1; - TYPE_TARGET_TYPE (typep) = nexttype; - } - } + typep = alloc_type (current_objfile); + TYPE_CODE (typep) = TYPE_CODE_ARRAY; + TYPE_LENGTH (typep) = TYPE_LENGTH (nexttype); + TYPE_LENGTH (typep) *= (highbound - lowbound) + 1; + TYPE_TARGET_TYPE (typep) = nexttype; + } break; case FMT_FT_C_X: case FMT_FT_X_C: |