forked from Imagelibrary/binutils-gdb
gdb/
* dwarf2read.c (read_subrange_type): Set TYPE_HIGH_BOUND_UNDEFINED. * valarith.c (value_subscripted_rvalue): Suppress error if TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
This commit is contained in:
@@ -6074,6 +6074,12 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
range_type = create_range_type (NULL, base_type, low, high);
|
||||
|
||||
/* Mark arrays with dynamic length at least as an array of unspecified
|
||||
length. GDB could check the boundary but before it gets implemented at
|
||||
least allow accessing the array elements. */
|
||||
if (attr && attr->form == DW_FORM_block1)
|
||||
TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1;
|
||||
|
||||
name = dwarf2_name (die, cu);
|
||||
if (name)
|
||||
TYPE_NAME (range_type) = name;
|
||||
|
||||
Reference in New Issue
Block a user