diff --git a/main.py b/main.py index 081150a..380a2dc 100644 --- a/main.py +++ b/main.py @@ -229,7 +229,9 @@ class Bear(): elif die_type.tag == 'DW_TAG_array_type': self.truly_resolve_type(entry, die_type.get_DIE_from_attribute('DW_AT_type')) load_children(die_type) - entry['number_of_elements'] = die_type._children[0].attributes['DW_AT_upper_bound'].value + 1 + + if 'DW_AT_upper_bound' in die_type._children[0].attributes: + entry['number_of_elements'] = die_type._children[0].attributes['DW_AT_upper_bound'].value + 1 elif die_type.tag == 'DW_TAG_union_type': load_children(die_type) child_entries = []