Fix crash when parsing array
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
e1be4b7e6a
commit
bd7272f365
4
main.py
4
main.py
|
@ -229,7 +229,9 @@ class Bear():
|
||||||
elif die_type.tag == 'DW_TAG_array_type':
|
elif die_type.tag == 'DW_TAG_array_type':
|
||||||
self.truly_resolve_type(entry, die_type.get_DIE_from_attribute('DW_AT_type'))
|
self.truly_resolve_type(entry, die_type.get_DIE_from_attribute('DW_AT_type'))
|
||||||
load_children(die_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':
|
elif die_type.tag == 'DW_TAG_union_type':
|
||||||
load_children(die_type)
|
load_children(die_type)
|
||||||
child_entries = []
|
child_entries = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user