From: Tom Tromey Date: Mon, 18 Jul 2011 15:17:35 +0000 (+0000) Subject: * dwarf2read.c (read_subrange_type): Use attr_form_is_block when X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d48323d808f5e45bcf818f7c993e8b8e8c4f9597;p=binutils-gdb.git * dwarf2read.c (read_subrange_type): Use attr_form_is_block when checking for variable-sized array. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 780414b55fb..44cc9d4a745 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-07-18 Tom Tromey + + * dwarf2read.c (read_subrange_type): Use attr_form_is_block when + checking for variable-sized array. + 2011-07-18 Jean-Charles Delay * varobj.h (varobj_languages): Add vlang_ada definition to the list diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index fde5b6a1153..da82a2e831c 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -8580,7 +8580,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_upper_bound, cu); if (attr) { - if (attr->form == DW_FORM_block1 || is_ref_attr (attr)) + if (attr_form_is_block (attr) || is_ref_attr (attr)) { /* GCC encodes arrays with unspecified or dynamic length with a DW_FORM_block1 attribute or a reference attribute. @@ -8663,7 +8663,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) /* 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) + if (attr && attr_form_is_block (attr)) TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1; /* Ada expects an empty array on no boundary attributes. */