elttype = check_typedef (unresolved_elttype);
if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (unresolved_elttype) > 0)
{
+ LONGEST low_bound, high_bound;
+
+ if (!get_array_bounds (type, &low_bound, &high_bound))
+ error (_("Could not determine the array high bound"));
+
eltlen = TYPE_LENGTH (elttype);
- len = TYPE_LENGTH (type) / eltlen;
+ len = high_bound - low_bound + 1;
if (options->prettyprint_arrays)
{
print_spaces_filtered (2 + 2 * recurse, stream);
if (c_textual_element_type (unresolved_elttype, options->format)
&& addr != 0)
{
- i = val_print_string (unresolved_elttype, addr, -1, stream,
+ i = val_print_string (unresolved_elttype, NULL, addr, -1, stream,
options);
}
else if (cp_is_vtbl_member (type))