aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-07-18 15:17:35 +0000
committerTom Tromey <tromey@redhat.com>2011-07-18 15:17:35 +0000
commitd48323d808f5e45bcf818f7c993e8b8e8c4f9597 (patch)
tree3abac48800a9fb3992de75c2cd7fb667f819653d /gdb/dwarf2read.c
parentf65cf84c3e52cec6be185c7d0f991e288c5d2c77 (diff)
downloadgdb-d48323d808f5e45bcf818f7c993e8b8e8c4f9597.zip
gdb-d48323d808f5e45bcf818f7c993e8b8e8c4f9597.tar.gz
gdb-d48323d808f5e45bcf818f7c993e8b8e8c4f9597.tar.bz2
* dwarf2read.c (read_subrange_type): Use attr_form_is_block when
checking for variable-sized array.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index fde5b6a..da82a2e 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. */