aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorWilfried Moser <moser@cygnus>1996-06-26 13:13:45 +0000
committerWilfried Moser <moser@cygnus>1996-06-26 13:13:45 +0000
commit81508b2759e6effdcd77c2d9e002e58194038900 (patch)
treef35018f7c4f4ffb99b85614ab34a356c1d83543a /gdb/gdbtypes.c
parentc21ee46b4915d87f1e362d3340288af9fe58dfbc (diff)
downloadgdb-81508b2759e6effdcd77c2d9e002e58194038900.zip
gdb-81508b2759e6effdcd77c2d9e002e58194038900.tar.gz
gdb-81508b2759e6effdcd77c2d9e002e58194038900.tar.bz2
* gdbtypes.c (create_array_type): If TYPE_LENGTH (result_type)
is zero, set TYPE_FLAG_TARGET_STUB to force reevaluation of the type. * ch-exp.c (calculate_array_length): Function removed.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 44827ab..de15b5a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -437,6 +437,10 @@ create_array_type (result_type, element_type, range_type)
TYPE_FIELD_TYPE (result_type, 0) = range_type;
TYPE_VPTR_FIELDNO (result_type) = -1;
+ /* TYPE_FLAG_TARGET_STUB will take care of zero length arrays */
+ if (TYPE_LENGTH (result_type) == 0)
+ TYPE_FLAGS (result_type) |= TYPE_FLAG_TARGET_STUB;
+
return (result_type);
}