pyelftools icon indicating copy to clipboard operation
pyelftools copied to clipboard

Incorrect offset in CU iter_DIE_children

Open pesvenss opened this issue 4 years ago • 1 comments

When iterating DIEs children in a compile unit the offset is calculated based on:

elif "DW_AT_sibling" in child.attributes:
	sibling = child.attributes["DW_AT_sibling"]
	cur_offset = sibling.value + self.cu_offset

If sibling.form is of type DW_FORM_ref_addr the cur_offset will be incorrect. The elf I am using has both DW_FORM_ref_addr and DW_FORM_ref4

pesvenss avatar Dec 21 '20 08:12 pesvenss

Can you provide either instructions how to generate or a small elf to demonstrate this?

mdmillerii avatar Sep 20 '21 22:09 mdmillerii