scripts: elf_helper.py: fix C++ template constexpr value processing
Some DWARF symbols for members of template classes members such as numeric_limits<unsigned int> reference are static constexpr values that do not have a data member location. Avoid attempting to dereference the value for that attribute when it isn't present. Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
parent
493e6c6265
commit
5611beeec1
1 changed files with 5 additions and 2 deletions
|
@ -295,9 +295,12 @@ def analyze_die_struct(die):
|
|||
for child in die.iter_children():
|
||||
if child.tag != "DW_TAG_member":
|
||||
continue
|
||||
data_member_location = child.attributes.get("DW_AT_data_member_location")
|
||||
if not data_member_location:
|
||||
continue
|
||||
|
||||
child_type = die_get_type_offset(child)
|
||||
member_offset = \
|
||||
child.attributes["DW_AT_data_member_location"].value
|
||||
member_offset = data_member_location.value
|
||||
cname = die_get_name(child) or "<anon>"
|
||||
m = AggregateTypeMember(child.offset, cname, child_type,
|
||||
member_offset)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue